Hi,
I am using VBScript and need to be able to set a group of radio buttons to checked or not checked based on data returned from the database.
I can set "checked" to true or false if the radio buttons are named differently, but once I name them all the same (ie create a group) the page will not load.
What I am trying to do is something like this:
select case rsData("type"
case "P"
window.CriteriaPg.rType[0].checked = true
window.CriteriaPg.rType[1].checked = false
case "S"
window.CriteriaPg.rType[0].checked = false
window.CriteriaPg.rType[1].checked = true
end select
The radio buttons are created using:
<INPUT name=rType type=radio value=P>Primary
<INPUT name=rType type=radio value=S>Secondary
Any ideas what I am doing wrong?
Thanks in advance
jan
I am using VBScript and need to be able to set a group of radio buttons to checked or not checked based on data returned from the database.
I can set "checked" to true or false if the radio buttons are named differently, but once I name them all the same (ie create a group) the page will not load.
What I am trying to do is something like this:
select case rsData("type"
case "P"
window.CriteriaPg.rType[0].checked = true
window.CriteriaPg.rType[1].checked = false
case "S"
window.CriteriaPg.rType[0].checked = false
window.CriteriaPg.rType[1].checked = true
end select
The radio buttons are created using:
<INPUT name=rType type=radio value=P>Primary
<INPUT name=rType type=radio value=S>Secondary
Any ideas what I am doing wrong?
Thanks in advance
jan