|
 |
asp_web_howto thread: unselect the combo box options?
Message #1 by "Sukhi" <sukhdeepsamra@h...> on Wed, 24 Oct 2001 21:02:26
|
|
I have a combo, which has 4 things, User can multiselect.
file1
file2
file3
file4
I have certain conditions where i am checking if it's ok to multiple
select or not
If it's not ok, Then i am display a alert box. I am doing that in
javascript:
if (strValue.match("1"))
{
if (strValue.match("2")) {
alert("Can have only one Title")
document.form.cboTitle.focus()
}
}
so it display the error message, adn when i click 'ok' the option values
are still selected in the combo box.
Is there way to Unselect the options within the the combo box after the
alert messagage. ( so that none of teh option is selected?)
let me know, if anyone knows the solution.
Thanks,
Sukhi
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 25 Oct 2001 09:43:51 +0100
|
|
something like
for(i in oSelect.options){
oSelect.options[i].selected=false;
}
-----Original Message-----
From: Sukhi [mailto:sukhdeepsamra@h...]
Sent: 24 October 2001 22:02
To: ASP Web HowTo
Subject: [asp_web_howto] unselect the combo box options?
I have a combo, which has 4 things, User can multiselect.
file1
file2
file3
file4
I have certain conditions where i am checking if it's ok to multiple
select or not
If it's not ok, Then i am display a alert box. I am doing that in
javascript:
if (strValue.match("1"))
{
if (strValue.match("2")) {
alert("Can have only one Title")
document.form.cboTitle.focus()
}
}
so it display the error message, adn when i click 'ok' the option values
are still selected in the combo box.
Is there way to Unselect the options within the the combo box after the
alert messagage. ( so that none of teh option is selected?)
let me know, if anyone knows the solution.
Thanks,
Sukhi
|
|
 |