Page 1 of 1
question
Posted: Mon Mar 15, 2004 4:28 am
by stefi
Hi there.
I was going to ask if there is a way that i can have a form that is passes values through its fields.
As an example i have 2 lists in the same form.
If take a selection to the first one, that has some results over the database. Can i give those results to the second list in the form? As options? In the same page?
Thank u for your time
I also apologize for my bad english.
Re: question
Posted: Mon Mar 15, 2004 8:31 am
by TheBentinel.com
stefi wrote:Hi there.
I was going to ask if there is a way that i can have a form that is passes values through its fields.
As an example i have 2 lists in the same form.
If take a selection to the first one, that has some results over the database. Can i give those results to the second list in the form? As options? In the same page?
Thank u for your time
I also apologize for my bad english.
You can do it in one form, but it's easier with frames. Do a frameset that gives you the list in one frame and the results in the other. On change of your list in frame1, update the contents of frame2.
Code: Select all
<frameset rows="50,50">
<frame name=listframe url="list.php">
<frame name=resultframe url="result.php">
<!-- result.php should be able to produce a default list -->
</frameset>
list.php generates your list, with javascript events watching for when the user clicks on a list item. When the user does, it changes the location for resultframe.
Something like:
window.resultframe.location.href = "result.php?" + window.listframe.selectList.value
The syntax may be wildly off, but that's a direction to go with it.