
February 11th, 2005, 06:14 PM
|
|
|
|
Join Date: Apr 2007
Location: Henrietta, NY, USA
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Getting Javascript generated data
It's possible this belongs in the php coding site, not sure. My html page consists of 2 lists defined as so:
<select name=list onClick='dropItem(this.form)'>
and
<select name=number onClick='addItem(this.form)'>
If the user clicks on an item in either list, the item they clicked goes to the other list with following javascript:
function addItem(form)
{
form.list.options[form.list.options.length] = new Option(form.number[form.number.selectedIndex].text, form.number[form.number.selectedIndex].value);
form.number.remove(form.number.selectedIndex);
}
function dropItem(form)
{
form.number.options[form.number.options.length] = new Option(form.list [form.list.selectedIndex].text, form.list[form.list.selectedIndex].value);
form.list.remove(form.list.selectedIndex);
}
Once done setting the lists, the user clicks on a button and a php script is called. I cannot seem to find the name value pairs in which the list values are returned. I've tried $_POST, $_REQUEST, I've looked at $number (as an array and not), $list (as an array and not), but everthing comes back empty. Is there something in the javascript that causes the data to come back under a different name maybe?
thanx for any assistance,
dusty
|