|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a swap-menu in a form that includes two multiple-selectboxes and two buttons for moving data between the boxes, and that works just fine. Now, when I press the submit-button, I want to take the data from selectbox no.2 into first a script that checks that it is something in the box at all and then forward into the database. I donīt want it to matter if the data in the selectbox are selected or not. I want it forward anyway....
Has anyone done this before? How can I do this? Please help |
|
#2
|
|||
|
|||
|
> I want to take the data from selectbox no.2 into first a script that checks that it is something in the box at all and then forward into the database.
Well, just do some sort of validation routine: function Validate() { if (document.theForm.selectbox.value) { return true; ****} ****else { ********return false; ****} } Now that selectbox.value bit is not the right way to address the variable, but it is just an example. Now, to make your script use this function, alter your <form> tag: <form method=POST action="your.cgi" onSubmit="return Validate()"> Then write a perl script or something to handle your data, once it gets there. [This message has been edited by JSchoof (edited September 20, 2000).] [This message has been edited by JSchoof (edited September 20, 2000).] |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > From swap-menu to database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|