I'm a noob and in need of some help
What I wanted to do was take a unique piece of information provided in the Web interface and run some scripts based on if/then statements. Here are the pieces that seem to be needed and how they are presented in the back-end of the Web interface:
I need the value from this element:
<INPUT TYPE="HIDDEN" NAME="RECNUMB" VALUE="1140005790">
I don't know why the creators of this program don't use ID tags, but they don't. As such, my coworker suggested I use the following to get that value:
var respondent = setTimeout(alert("document.forms.elements['RECNUMB'].value"),500);
This leads to another strange caveat of the program. It seems that it does not like performing functions that are NOT part of setTimeout. The reason we used alert was to see if the RECNUMB would be returned (which it is), but I'm having trouble from that point. Here is the rest of the script:
if (respondent >= 1100000000 && respondent <= 1200000000)
else if (respondent >= 1200000001 && respondent <= 1300000000)
Everything I've been trying gives me errors, typically ones saying that "document.forms.elements['RECNUMB'].value is null." My coworker suggested using parseInt to change the RECNUMB string to an integer, but I'm still having problems.
Since it seems that this program doesn't use conventional syntax, I may just be stuck with trial and error for a while, but I thought the members of this forum might be able to shed some light on the issue. I very well may have this all wrong from the start.
Thank you for your help!
Also, sorry for the posting faux pas...
Next time I'll use a more descriptive heading and the vB blocks.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)