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 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 (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 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 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 (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
2 answers 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.