Advanced Search

Results 1 to 3 of 3

Thread: Auto Form

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Post Auto Form

    I have a form on my website but i wanted it to auto submit when i visit it instead of having to click the button i already have it selected. I dont know if its possible this is the code i have "<form method="post" action="address">
    <input type="hidden" name="poll_id" value="poll name">
    <table align=center style="font-family:Tahoma; font-size:12pt" width=304 border=1>
    <tr><th align=center>Vote</td></tr>
    <tr><td><input type='radio' name='vote' value='9' checked="checked"> button name <input type='submit' value=' Vote ! '></td></tr><tr><td align=center style='font-family:Tahoma; font-size:10pt'></tr>
    </table>
    </form>"

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    You would need to use a language like AJAX so submit it. If you know JavaScript, it should be easy. Just google for some tutorials.
    Last edited by Jas; 02-21-2008 at 06:30 PM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    0
    Thanked 1 Time in 1 Post

    Lightbulb

    I changed your code to submit the form automatically when you click on the radio button.
    The onClick attribute tells the browser what to do when somebody clicks the element. The contents of the attribute is JavaScript code. It tells the browser that it should take the document, find the first form, and submit it.
    If you need to submit another form, increase the number in square brackets.

    HTML Code:
    <form method="post" action="address">
    	<input type="hidden" name="poll_id" value="poll name">
    	<table align=center style="font-family:Tahoma; font-size:12pt" width=304 border=1>
    		<tr><th align=center>Vote</td></tr>
    		<tr><td><input type='radio' name='vote' value='9' checked="checked" onClick="document.forms[0].submit()"> button name
    				<input type='submit' value=' Vote ! '></td></tr>
    		<tr><td align=center style='font-family:Tahoma; font-size:10pt'></tr>
    	</table>
    </form>

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
  •