Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submitting a Form on Page Load

    Hi,

    Im looking for a way of submitting a form each time a page is loaded, the form will send an sms when certain conditions are met. I cant use a button for this, so i need some way of doing it automatically.

    Currently i am trying:

    Code:
    <BODY onLoad="document.body.monitor.submit()">
    
    <form method="POST" action="http://webstrikesms.com/sms.exe/" name="monitor">
    <input type="hidden" name="FromEmail" value="monitoring">
    <input type="hidden" name="TextMessage" value="monitoring">
    </form>
    Thanks

    Andrew

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Don't know much about wireless - but this:

    <BODY onLoad="document.body.monitor.submit()">

    ...has one too many objects (guess which). Using the onload handler like this could get you into an endless loop; 'when certain conditions are met' is kind of mysterious. Might want to write something (at the server) to a hidden field as a flag to determine (client-side) whether the data in question has already been sent.

    <body onload="if(document.monitor.sendflag.value=='send')document.monitor.submit()">


  •  

    Posting Permissions

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