Hi guys,
I have this code that i have recieved from someone to move data between two select boxes. I am having problems retrieving the data when it is posted to an ASP page. If i dont move any data using the code i can access it. If i do click one of the buttons that executes the function the data moves and is visible in the other box.
But when i post it i cannot retrieve the data.
Has anyone got any ideas on the problem?
Thanks Si.
the code:
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
}
if (action == 'add'){
c2 = document.getElementById("clients2"
c2.options[c2.options.length] = new Option (document.myForm.clients1[thisOption].text, document.myForm.clients1[thisOption].value)
c1 = document.getElementById("clients1"
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getElementById("clients1"
c1.options[c1.options.length] = new Option (document.myForm.clients2[thisOption].text, document.myForm.clients2[thisOption].value)
c2 = document.getElementById("clients2"
c2.options[thisOption] = null
}
}
I have this code that i have recieved from someone to move data between two select boxes. I am having problems retrieving the data when it is posted to an ASP page. If i dont move any data using the code i can access it. If i do click one of the buttons that executes the function the data moves and is visible in the other box.
But when i post it i cannot retrieve the data.
Has anyone got any ideas on the problem?
Thanks Si.
the code:
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
}
if (action == 'add'){
c2 = document.getElementById("clients2"
c2.options[c2.options.length] = new Option (document.myForm.clients1[thisOption].text, document.myForm.clients1[thisOption].value)
c1 = document.getElementById("clients1"
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getElementById("clients1"
c1.options[c1.options.length] = new Option (document.myForm.clients2[thisOption].text, document.myForm.clients2[thisOption].value)
c2 = document.getElementById("clients2"
c2.options[thisOption] = null
}
}