|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all. I'm new to html, and I have a simple(?!) question. I wonder if anybody could tell me how to get to the values in other forms when I want to post them to some other page. Check out the following example:
... <DIV> <FORM NAME="F"> <SELECT NAME="a"> <OPTION VALUE = "1">1</OPTION> <OPTION VALUE = "2">2</OPTION> </SELECT> </FORM> </DIV> <FORM NAME="S" ACTION="somefile.php" METHOD=POST> <INPUT TYPE=SUBMIT NAME="s_btn" VALUE="Save"> </FORM> ... How do I get the value that is chosen in form F to be posted to somefile.php when Save button is pressed?? If anybody could spare some time to enlighten me, I would be very gratefull. Cheers |
|
#2
|
|||
|
|||
|
I don't see why you use two forms instead of one, but anyway, the answer is: on the onsubmit event of the second form you code a javascript line like this:
document.F.submit(); Dragos |
|
#3
|
|||
|
|||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by dragos:
I don't see why you use two forms instead of one, but anyway, the answer is: on the onsubmit event of the second form you code a javascript line like this: document.F.submit(); Dragos[/quote] Thanx for help Dragos. I use 2 forms 'cause its only an example to show the core of a larger scale problem. |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > how to get to the values in other forms |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|