Results 1 to 4 of 4

Thread: i got a JavaScript problem

  1. #1
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question i got a JavaScript problem

    Hey peaople can anyone of you tell me how to make "auto-submit" function.
    I want to submit my information without clicking the "submit" button. Is there is a command to do that for me. if someone tell me that, he will help so much.
    please write at hiksaa@gmail.com if you apply and example, you really will be priceless

    thank you!

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Code:
    <script type="text/javascript">
    function submitform()
    {
      document.formName.submit(); //use your form name instead of formName
    }
    </script>
    You can insert the above function in your <head> section. Make a call to that function when you need to submit the form.

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ouch. Don't rely on forms being available as properties of document; use the forms collection:
    Code:
    function submitForm() {
      document.forms['fromName'].submit();
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up 10x

    hey, really thank you for this!

Bookmarks

Posting Permissions

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