05. september 2005 - 13:58
Der er
6 kommentarer
Select med flere "values"
Hvorn' får jeg også indsat et telefonnr. i <input type="text" name="telefon"> når vælger i "select'en" ..? <form action="..." method="post"> <select onchange="if(this.selectedIndex>0)this.form.email.value=this.value"> <option>Vælg her ...</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> </select><br> <input type="text" name="email"><br> <input type="text" name="telefon"> <input type="submit" value="Send bestilling"> </form>
Annonceindlæg fra Kingston Technology
05. september 2005 - 15:02
#1
<select onchange="if(this.selectedIndex>0){val=this.value.split('|');this.form.email.value=val[0];this.form.telefon.value=val[1];}"> <option>Vælg her ...</option> <option value="rapp@eksperten.dk|12345678">rapp</option> <option value="rapp@eksperten.dk|12345678">rapp</option> <option value="rapp@eksperten.dk|12345678">rapp</option> </select><br> <input type="text" name="email"><br> <input type="text" name="telefon">
08. september 2005 - 09:38
#4
<html> <head> </head> <body bgcolor="#FF8A00" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"> <form action="sendmail.asp" method="post"> <input type="hidden" name="subject" value="Bestilling"> <form action="..." method="post"> <select onchange="if(this.selectedIndex>0){val=this.value.split('|');this.form.email.value=val[0];this.form.telefon.value=val[1];}"> <option>Vælg her ...</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> </select><br> <input type="text" name="email"><br> </form> <table class="formsplit" width="260" border="0" cellspacing="0" cellpadding="0" height="60"> <tr> <td align="center" valign="middle"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td height="15"><span class="brod">Type</span> <td width="7"></td> <td><span class="brod">Leveringsdato</span></td> </tr> <tr> <td><input class="formfelt" type="text" name="bestillingaf" size="21"></td> <td width="7"></td> <td><input class="formfelt" type="text" name="datolevering" size="10"></td> </tr> </table> <form action="..." method="post"> <select onchange="if(this.selectedIndex>0){val=this.value.split('|');this.form.email.value=val[0];this.form.telefon.value=val[1];}"> <option>Vælg her ...</option> <option value="Jesper|12345678">rapp</option> <option value="Niels|12345678">rapp</option> <option value="Jens|12345678">rapp</option> </select><br> <input type="text" name="kontaktperson"><br> <input type="text" name="telefon"> </form> <input type="submit" name="SendOrdre" value="Send bestilling"> </form> </body> </html>
08. september 2005 - 11:08
#6
du har 2 form-tags for meget og så indsætter du vædierne i i beggen select's i samme felter - det skal nok se således ud: <body> <form action="sendmail.asp" method="post"> <input type="hidden" name="subject" value="Bestilling"> <select onchange="if(this.selectedIndex>0) this.form.email.value=this.value;"> <option>Vælg her ...</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> <option value="rapp@eksperten.dk">rapp</option> </select><br> <input type="text" name="email"><br> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td height="15"><span class="brod">Type</span> <td width="7"> </td> <td><span class="brod">Leveringsdato</span></td> </tr> <tr> <td><input class="formfelt" type="text" name="bestillingaf" size="21"></td> <td width="7"></td> <td><input class="formfelt" type="text" name="datolevering" size="10"></td> </tr> </table> <select onchange="if(this.selectedIndex>0){val=this.value.split('|');this.form.kontaktperson.value=val[0];this.form.telefon.value=val[1];}"> <option>Vælg her ...</option> <option value="Jesper|12345678">rapp</option> <option value="Niels|12345678">rapp</option> <option value="Jens|12345678">rapp</option> </select><br> <input type="text" name="kontaktperson"><br> <input type="text" name="telefon"><br> <input type="submit" name="SendOrdre" value="Send bestilling"> </form> </body>