Click to See Complete Forum and Search --> : Error retreiving textbox variable


ljcharlie
05-08-2003, 08:41 PM
I have tried for two days now and the page still doesn't work. Here's my situation. I created a form and before I want to submit the form to a .php file, I want to verify if all those textbox fields are filled. So I created a Javascript verification function. Here's my script:

<SCRIPT LANGUAGE="JavaScript">
function testResults () {
var TestVar = document.updActivities.txtLocation.value;
var vrWhat = document.updActivities.txtWhat.value;
var vrWhom = document.updActivities.txtWhom.value;
alert ("You typed: " + TestVar + " What: " + vrWhat + "Whom: " + vrWhom);
}
</SCRIPT>


The way I called is onClick = testResults(). I also tried onClick = "testResults(this.form) and then in the script use the form name. But it's not always working. Here's the link

Click Here (http://www.losociety.org/test3.shtml)

to the problematic page if you would be kiind enough to debug it for me. The error is in the Time textbox field. This textbox should autmatically convert the number you typed into a time format that's acceptable in MySQL once you tab to the next textbox.

Many thanks in adavance!

ljCharlie

pyro
05-08-2003, 08:59 PM
The code that you posted is doing nothing with the time textbox... Do you have some code that you could post that shows what you are trying to do with this?

ljcharlie
05-08-2003, 09:25 PM
Thanks for trying to help. Okay, I got it. It's working now. I forgot that the error came from the time textbox never doing anything. I have the incorrect name in the SSI.

ljCharlie