Hello world!
I’m trying to figure out, but I can’t, how to call a JS function that’s defined in the header of my page within the OPTION tag of a SELECT tag.
What’s happening is that as the page loads I’m pulling the options together with a SQL statement and if the statement yields one record I want the form to select the value and run a JS that pre-populates other fields in the form.
When the list yields multiple names, then they just click and the JS runs with an onclick event handler. However, when the list yields one item, none of the mouse or keyboard event handlers would apply to get the JS to happen. I tried just popping it in as an “onload” within the OPTION tag, but that didn’t work either. Is there another way to do this?
I’m a bit stuck on where the JS is called because I’m interspersing with VBscript and SQL statements.
Thanks in advance!!!!!
Me ?