S
simon
hello,
I have a form that has 10 dropdown lists in one section
each of the dropdowns contain the same data
what i'm looking to do is that when a user selects a value from one
dropdown, change the value to null/nothing for any other dropdowns
that may have had the same value as the one that was just selected.
and have all the dropdowns use the same "selected index changed" code
behind.
so if ddl1 was changed, fire the code behind to sweep thru all the
dropdowns and reset it if there was a match.
was thinking of pseudo code for this would be something like....
assume all the dropdowns are named dd1,dd2,dd3,dd4,dd5,dd6,etc
while I < 11
loop
if newly selected value = "ddl"+I.selectedindex.text then
"ddl"+I.selectedindex = 0
end if
end loop
in javascript there is a function eval() whose parameter is a string.
so results of that call eval("string_to_evaluate") gets executed or
interpreted as if you had type the string out directly.
also, what would be the line of code to tell which dropdown the user
changed and cause the codebehind to trigger? what I was calling
"newly selected value" above
thanks again for any help!
I have a form that has 10 dropdown lists in one section
each of the dropdowns contain the same data
what i'm looking to do is that when a user selects a value from one
dropdown, change the value to null/nothing for any other dropdowns
that may have had the same value as the one that was just selected.
and have all the dropdowns use the same "selected index changed" code
behind.
so if ddl1 was changed, fire the code behind to sweep thru all the
dropdowns and reset it if there was a match.
was thinking of pseudo code for this would be something like....
assume all the dropdowns are named dd1,dd2,dd3,dd4,dd5,dd6,etc
while I < 11
loop
if newly selected value = "ddl"+I.selectedindex.text then
"ddl"+I.selectedindex = 0
end if
end loop
in javascript there is a function eval() whose parameter is a string.
so results of that call eval("string_to_evaluate") gets executed or
interpreted as if you had type the string out directly.
also, what would be the line of code to tell which dropdown the user
changed and cause the codebehind to trigger? what I was calling
"newly selected value" above
thanks again for any help!