Possible Corrupt .wbs project

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
Post Reply
davidflash
 
 
Posts: 3
Joined: Fri Jul 17, 2015 8:25 pm

Possible Corrupt .wbs project

Post by davidflash »

Is there any way I can check to see if the .wbs has any issues itself. The reason being is that I have a function that I run . When one variable is used it works fine, but the second variable it just stops (I guess). Can the .wbs be refreshed. Do I , can I copy code to a new .wbs??

I put in alerts at certain points within the function to see how far the function runs before it just stops, When m = "G1BT" works fine.
but the second variable "G2BT". it just seems to stop at Alert ("Me"); When G2BT is the value, I do not get the Alert ("Me"); Which tells me sometihing is not right.

Any ideas why this is happening??

See code below:
function EnableGuest(mID){
var m = mID;

if (m == "G1BT"){
var FN = "G1FN";
var LN = "G1LN";
var AGE= "G1AGE";
var LBL = "G1LBL";}

if (m == "G2BT"){
var FN = "G2FN";
var LN = "G2LN";
var AGE= "G2AGE";
var LBL = "G2LBL";}

if (m == "G3BT"){
var FN = "G3FN";
var LN = "G3LN";
var AGE= "G3AGE";
var LBL = "G3LBL";}

if (m == "G4BT"){
var FN = "G4FN";
var LN = "G4LN";
var AGE= "G4AGE";
var LBL = "G4LBL";}

if (m == "G5BT"){
var FN = "G5FN";
var LN = "G5LN";
var AGE= "G5AGE";
var LBL = "G5LBL";}


var myButton = document.getElementById(m).value;


if (myButton == "Add Guest"){
alert(m+" "+myButton);
var G1F =document.getElementById(FN);
var G1L =document.getElementById(LN);
var G1A =document.getElementById(AGE);
var G1LB =document.getElementById(LBL);

G1F.style.display = "block";
G1L.style.display = "block";
G1A.style.display = "block";
G1LB.style.display ="block";

G1F.disabled = false;
G1L.disabled = false;
G1A.disabled = false;
alert("me");
var a = document.getElementById(m);

a.value = "Remove Guest";
alert("AFTER CHANGE "+m+" "+a.value);
// alert( "ID "+m+" Value "+a.value);
return;
}
if (myButton == "Remove Guest"){
var G1F =document.getElementById(FN);
var G1L =document.getElementById(LN);
var G1A =document.getElementById(AGE);
var G1LB =document.getElementById(LBL);

// alert(myButton);
G1F.style.display = "none";
G1L.style.display = "none";
G1A.style.display = "none";
G1LB.style.display ="none";

G1F.disabled = true;
G1L.disabled = true;
G1A.disabled = true;


var a = document.getElementById(myButton.value);
var e = document.getElementById(mID)
e.value ="Add Guest";
}

}

Any asistance will be appreciated..
User avatar
BaconFries
 
 
Posts: 5325
Joined: Thu Aug 16, 2007 7:32 pm

Re: Possible Corrupt .wbs project

Post by BaconFries »

As you may already know it is not possible to assist with custom code, if you wish to use it is for you yourself to be able to debug errors.

Forum Rules - PLEASE READ BEFORE YOU POST!
6. In general, we do not provide support for custom code or custom scripts.
User avatar
Pablo
 
Posts: 21573
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Possible Corrupt .wbs project

Post by Pablo »

The behavior of your own code has nothing to do with whether or not the .wbs project is corrupt.
If the code does not work then either there is a mistake in the code or it conflict with other scripts.
Post Reply