Hi there,
I have 2 select boxes(box1&box2) and a text field. I am doing a search. I enter the search data into the text field. And the search result is used to populate the select box1. The box1 values( which contain search result) are moved into select box2. I want to repeat the search several times without losing the values that are initially in the select box2. In other word I don't want to refresh the page anytime I do the search.
Can you please assit.
Emile
select box in php
Moderator: General Moderators
What you ask is not exactly possible, as to perform a search the form would need to be submitted, therefore refreshing the page.
Also, using javascript doesn't allow you to edit the contents of dropdown boxes once the have been created (recieved by the browser). One alternate is to use DHTML/layers, but I couldn't tell you how to do this and it would still need some form of sending data, thus refresh.
If you make the page with the form on, as small as possible (bytes wise not screen
), then the user will not really notice, depending on the time taken to do the server side search.
Also, using javascript doesn't allow you to edit the contents of dropdown boxes once the have been created (recieved by the browser). One alternate is to use DHTML/layers, but I couldn't tell you how to do this and it would still need some form of sending data, thus refresh.
If you make the page with the form on, as small as possible (bytes wise not screen
- daven
- Forum Contributor
- Posts: 332
- Joined: Tue Dec 17, 2002 1:29 pm
- Location: Gaithersburg, MD
- Contact:
Actually, you can use JS to change the contents of a select box. However, you cannot perform a search without reloading (sending info to PHP).
viewtopic.php?t=6568
Code examples as to repopulating dropdowns
viewtopic.php?t=6568
Code examples as to repopulating dropdowns