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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto-Submission, Tricky Code.

    <body onload="form1.submit();">
    <form name="form1" method="post" action="do-it.php">
    <input type="hidden" name="radiobutton" value="5">
    <input name="submit" type="submit" id="submit" value="Lets do it.">
    </form>
    </html>
    Okay. Ive been into html for about a year now. I basicly know it.

    I am having aproblem here though. What i believe the problem is, is that the name of the submit button (submit), is getting mixed up with the the "submit()" function. Basicly, they seem to have the same value so to speak.

    When i change the value of the button name (form submit, to submit1), it automatically submits as it is suppossed to, but the form IS NOT processed, as the "submit" button seems to be a VALUE in the form -- like "radiobutton".

    To put it easy, the buttons values (submit), is needed ot submti the form. But also needed to do it automatically. So when i try to submit the form, nothing happens. I cannot change the name of button, as it is needed for the form to be proccessed. Once i successfully have it auto-submitting, i plan to change the type from button, to hidden.

    This is more a goal.

    Im not sure exacly how to do this though. I have tryed targeting javascript and everything. Please help me out. Ive been working on this...

  • #2
    Regular Coder
    Join Date
    Apr 2006
    Posts
    117
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I am unsure at what you are saying friend.

    Have you tried closing the body tag? That's one thing for starters. I highly doubt that your Function and Name our getting mismatched... but it is possible, I guess. I notice you have submit as your ID name and type. Switch it up a bit. Make the ID something different (I am guessing you are using the submit ID for your CSS). It makes it much easier to read.
    Last edited by Tyrial101; 01-03-2007 at 02:50 AM.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto submitting

    Here a similar question was asked, with an alternative approach:

    http://www.webmasterworld.com/forum13/1532.htm

    Maybe you can do without the submit button afterall.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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