SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Form Post

Hybrid View

  1. #1
    SitePoint Enthusiast alf's Avatar
    Join Date
    Aug 2000
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for reading my post. I would like to know anyone can help me with this. I want to click one button/link to submit many forms at once. Someone told me that it can be done by using Javascript.
    Does anyone know how to do this? The purpose I wanted to do that is to automate submission of over 30 forms /day to my site for analysing purpose. Thanks!

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    edited to correct the line calling "SubmitForms()"

    with vbscript, it can be done using the 'form.submit' command. You can write it directly, into your page, i think, like below:
    Code:
    <SCRIPT LANGUAGE="VBSCRIPT">
    Private Sub SubmitForms()
    form1.submit
    form2.submit
    form3.submit
    End Sub
    </SCRIPT>
    Then, in your form code, write:
    Code:
    <INPUT TYPE="BUTTON" onClick="VBScript:SubmitForms()">
    Correct me if I'm wrong, guys, but I believe this should work. I am a little rusty on syntax, though, so I would get a second opinion if I was you. Also, I'm unsure of the "VBScript:SubmitForms()" line. You may be able to just say "SubmitForms()".

    Good luck with your scripts!
    Last edited by goober; Feb 23, 2001 at 17:45.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, this may have been better suited for the "Client Side Programming" forum.

    If I was a community admin, I would move it.

    But, hmmmm, let's see..nope, still not an admin.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  4. #4
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Moved.

    The problem I see with a VBScript/JavaScript solution is that as soon as you submit the first form in a page, the browser stops running your script to load the result page from the form! If each of your forms are in a different frame/window of the page, then you could do it quite easily, however.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  5. #5
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kevin's definitely right.

    Gotta hand it to the man.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  6. #6
    SitePoint Enthusiast alf's Avatar
    Join Date
    Aug 2000
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks goober and Kevin for your valuable information. Actually I am not good in Java/VB scripting. Can any of you please tell me how to make the forms in a different frame/window of the page as Kevin mention? Your information is very helpful to me.
    Thanks again!


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
  •