PDA

Click to See Complete Forum and Search --> : js function in asp form page


Nov 14th, 2000, 03:25 AM
Hi all!

I have an ASP search page, containing a form. On my form, I have a textbox (input type=text) representing the keyword the user entered to search for. After pressing the submit button, it displays the first 10 results. Underneath those, I have a Previous and a Next button. Now when the user clicks one of the buttons, I trigger a function (in javascript) that is supposed to set the value of the textbox, and then submit the form.

I know I can submit the form like this:
document.myform.submit();

So what I figured was that I would have to set the value of the keword like this:
document.myform.keyword = "value";
or maybe
document.myform.keyword.value = "value";

But neither of those seem to work, coz it tells me that document.myform.keyword is not an object.

Can anyone please tell me how it is supposed to be done?
Thanx! :)

Nov 14th, 2000, 04:06 AM
Sorry, found it..
It turns out to be case-sensitive, so it worked when I used
document.myform.Keyword.value = "value";