Re: Select Values Didn't Get Passed in From Two Different Forms

From: Date: Wed, 26 May 2010 22:11:00 +0000
Subject: Re: Select Values Didn't Get Passed in From Two Different Forms
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-305557@lists.php.net to get a copy of this message
On Wed, 26 May 2010 11:02:10 -0400, Alice Wei wrote: [De-indented to preserve sanity] > <ul> > <form action="" method="post"> Bzzt. Only <li> elements can be children of <ul>. > <li>Select the type of your starting point of interest:<br/> > <div id="start_menu"> > <form action="test_getrss.php" name="form1" > method="post"> Bzzt. You didn't close the previous <form>. You can *not* have nested <form> elements. > <span><input type="radio" value="Apartment" > name="start" > onclick="check(document.form1.start)"/> Apartment </span> > <span><input type="radio" value="Grocery" > name="start" > onclick="check(document.form1.start)"/> Grocery </span> > Bzzt. Non-standard DOM references. Use check(document.forms.form1.elements.start) or check(this.form.elements.start) or check(this) Note that the first two will pass a collection of elements because you have two controls with the same name. The third will pass a single element. > </form></div></li> > </ul> > > <form action="process.php" method="post"> > > <input type="hidden" name="form1" value="<?php echo > $start?>"/> > <input type="submit" value="Submit" name="submit"/> > <input type="reset" value="Reset" name="reset"/> > </form> Bzzt. An input control with the same name as one of the forms? Wasn't it confusing enough already? /Nisse

« previous php.general (#305557) next »