Jump to content
  • 0

Use a parameter from a datapage in javascript on that page


Billp

Question

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

  • 0

@Ilyrian  Perhaps you missed the part where I said I already read through all that and there isn't anything about parameters unless those are considered virtual fields?  I have also opened developer tools and searched high and low for a reference on the page either through view source (not developer tools) and through inspect and I can't find a reference that prefixes my settype parameter name with anything or I would have tried that.   So sorry but this doesn't help me.  What I am trying to avoid is even more trial and error taking up hours of time.  

 

 

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...