www.webdeveloper.com
Results 1 to 3 of 3

Thread: inputbox vs. onload and then....

  1. #1
    Join Date
    Jul 2007
    Posts
    7

    inputbox vs. onload and then....

    Hi,

    i have a submit button + input box, which value i fill with onload in <body>.
    if i click the submit button, it will make a formular submit.

    my question is: can i replace the submit-button with a js-function on the inputbox that generate the same action as the submit button ??

    i have tried "onchange" but it didn't work, because onchange need :

    1. a klick to the input box
    2. value change
    3. another klick outside the input box.

    but in my case, i only have a value change of the input box from onload()

    thanks for the help

  2. #2
    Join Date
    Nov 2005
    Posts
    170
    you don't have to have a sumbit button to submit a form!

    you can submit the form at anytime you want to using javascript!


    document.forms[0].submit();

  3. #3
    Join Date
    Jul 2007
    Posts
    7
    oooo if i combined settimeout() with your suggestion, i think it would work just fine... i didn't think about .submit() because i want "to admire" the value in inputbox, before the form beeing send. If i have a submit-button it would do the trick and i have time to admire it....

    but as i said, settimeout before .submit() would do the trick.. what do you think Robdavid ?

    thanks for your help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles