Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] OT Automatically SUBMIT a FORM ?

Expand Messages
  • Richard Taylor
    Well, at the risk of being flamed and so that the group can see the window.setTimeout() and window.submit() methods in javascript. Here s a quick script I
    Message 1 of 1 , Oct 12, 2001
    • 0 Attachment
      Well, at the risk of being flamed and so that the group can see the
      window.setTimeout() and window.submit() methods in javascript.

      Here's a quick script I whipped up I put an alert into the body that
      notifies you that it has reloaded. There is also an alert in the
      submit_form function.

      To make this even more User-Unfriendly I threw a string into the body of the
      doc that utilizes string.blink() -- this only works in Netscape-- flame away
      folks :-)

      And for all the IE folks out there I threw in an example of manipulating the
      marqee object.

      Hey, at least I didn't put in an onUnload function that popped up the
      example again every time try close this example!

      http://www.drummingnet.com/library/javascript/submit.html

      Have fun and don't actually put any of this on your site... :-),

      Richard

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

      <html>
      <head>
      <title>Untitled</title>
      <script language="javascript" type="text/javascript">
      window.setTimeout("submit_form()", 10000); //milliseconds for time. ten
      seconds

      function submit_form()
      {
      document.test.submit();
      alert ("time up");
      }


      </script>
      <script language="VBScript"><!--
      Sub btnLeft_onclick()
      marq.direction="left"
      End Sub

      Sub btnRight_onclick()
      marq.direction="right"
      End Sub

      Sub btnUp_onclick()
      marq.direction="up"
      End Sub

      Sub btnDown_onclick()
      marq.direction="down"
      End Sub


      --></script>

      </head>

      <body onload="javascript: alert('page reloaded');">
      <form name="test" action="submit.html">
      <input type="Text">
      <input type="Submit">
      </form>
      <script language="javascript" type="text/javascript">

      var worldString="Hello, world"
      document.write(worldString.blink())
      document.write(worldString.scroll())
      </script>

      <br><br>
      <font color="#ffffff">
      <marquee id="marq" scrollheight=100 bgcolor="#336699">Scrolling Marquee
      Manipulation...click the buttons to change my
      direction!</marquee></font><br>
      <br>
      <button id="btnLeft">Left</button>
      <button id="btnRight">Right</button>
      <button id="btnUp">Up</button>
      <button id="btnDown">Down</button>
      </body>
      </html>


      ----- Original Message -----
      From: "Trap 13" <bugbuilder@...>
      To: <perl-beginner@yahoogroups.com>
      Sent: Friday, October 12, 2001 2:30 AM
      Subject: Re: [PBML] Automatically SUBMIT a FORM ?


      > On Fri, Oct 12, 2001 at 03:09:00PM +1300, Gordon Stewart wrote:
      > >
      > > Hi there, Im developing a form, using CGI/Perl to create the form.
      > >
      > > & when you submit it - the results / input - Are re-directed into the
      same cgi script.
      > > which either re-prints the form - and/or does another action.
      > >
      > > I was wondering...
      > >
      > > Is there a way to automatically 'refresh' - or 'submit' the form - after
      60 seconds - or so.. ?
      > >
      > > If theres a way to automatically 'submit' the screen (including any
      changes a person makes)
      >
      > I have seen a somewhat similar question in a PHP ml, the guy who
      > answered the question has been flamed by the other ml members. It's
      > considered as a prejudice against the freedom of the internet users.
      >
      > >
      > > If thats possible, can it say - if the person manually presses the
      'submit' button - the 'value' is 2..
      > >
      > > but if it is submitted automatically - the 'value' is 1
      > >
      > > EG -
      > >
      > > $text - Will be a persons entry...
      > >
      > > $value is 1 or 2 - If it automatically submits - it sendas $value of 1 &
      whatever the person has entered in the $text field.
      > >
      > > G.
      > >
      > >
      > >
      > >
      > >
      > >
      > > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
      > >
      > >
      > >
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.