Results 1 to 5 of 5

Thread: Mulitple Forms on same page

  1. #1
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Mulitple Forms on same page

    Hi Guys, I am having a HUGE problem I am using Javascript to submit forms on a PHP page.

    Form Code
    Code:
    <form style="margin: 0px; padding: 0px;"><?php echo $msg_from_image;?><input id="pokeid" value="<?php echo $pokeid;?>" name="pokeid" size="10" Type="hidden">
    
    <input id="from" value="<?php echo $to_id;?>" name="from" size="10" Type="hidden">
    
    <input id="to" value="<?php echo $from;?>" name="to" size="10" Type="hidden">
    
    <input id="delete" value="1" name="delete" size="10" Type="hidden">
    
    <input class="button" onClick="DeleteFunction();" value="Delete" type="button" ></form>
    However when I run this code and i have 3 forms on the same page, it deletes the first form not the one that i want to delete.

    If anyone can help that would be nice.
    Thanks
    Russell Harrower
    The web in one word.

  2. #2
    Join Date
    Apr 2009
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    a form never begin without ending the previous form.

    its not a problem that a page may contain any number of forms

    please verify on closing and begining of forms.

    if it is your mistake then ok.
    other wise

    there is no full code to understand this

  3. #3
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    If you look at that code, you will see the form and the /form so i did end the form code.
    The web in one word.

  4. #4
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    a form never begin without ending the previous form.

    its not a problem that a page may contain any number of forms

    please verify on closing and begining of forms.

    if it is your mistake then ok.
    other wise

    there is no full code to understand this
    Give the full coding or check your code, if don't close the form tag, verify the code

  5. #5
    Join Date
    Feb 2009
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try looking at the following thread i had a similar problem and this seemed to work. Could be where u initialize the variables in the javascript

    http://www.dynamicdrive.com/forums/s...ad.php?t=43536

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
  •