Results 1 to 2 of 2

Thread: js function in asp form page

  1. #1
    Guest

    Talking

    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!

  2. #2
    Guest
    Sorry, found it..
    It turns out to be case-sensitive, so it worked when I used
    document.myform.Keyword.value = "value";

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width