I posted this in another forum but the answer I got just pointed me to a caspio document that I had said in the question I had already poored through. I have been trying things to get the right syntax but I am really hoping to find someone who can help me avoid all this trial and error.
I have a parameter passed from Weebly to a datapage using the URL ? syntax. When used in the datapage the syntax is [@settype] then I use comparisons to hide or show parts of the datapage. This way only have to have one datapage for both types of information. But...I want to change the label for entering the email address based on the value of settype and I can't find settype using dynamic labels but it would be very easy in javascript to do this. But...I have not been able to figure out how to reference settype in the javascript. Simply using the name of the parameter, as shown below, doesn't work and I've looked through the doc's on referencing the elements, hence I can lookup the label and change the innerhtml just fine but I need to do it conditionally. So, how to reference settype in javascript like this example: (the one that doesn't work):
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Billp
I posted this in another forum but the answer I got just pointed me to a caspio document that I had said in the question I had already poored through. I have been trying things to get the right syntax but I am really hoping to find someone who can help me avoid all this trial and error.
I have a parameter passed from Weebly to a datapage using the URL ? syntax. When used in the datapage the syntax is [@settype] then I use comparisons to hide or show parts of the datapage. This way only have to have one datapage for both types of information. But...I want to change the label for entering the email address based on the value of settype and I can't find settype using dynamic labels but it would be very easy in javascript to do this. But...I have not been able to figure out how to reference settype in the javascript. Simply using the name of the parameter, as shown below, doesn't work and I've looked through the doc's on referencing the elements, hence I can lookup the label and change the innerhtml just fine but I need to do it conditionally. So, how to reference settype in javascript like this example: (the one that doesn't work):
if (settype == "form1"){
do the code to change the label
}else{
do the code to change the label to something else
}
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.