Billybong007
IS-IT--Management
Hi,
I've been hacking away at a script to determine if a radio button value is in a list of numbers
Using support from other in the ASP section of the site and from other tutorials on the net and came up with :
I can get the scripts working seperately i.e. I have learnt now how to split the variable and display the results.
I have also been able to determine the value of a dynamic number of radio buttons and display the value - so I added the two scripts together with a few edits to determine if (!group1Checked) == (!mySplitResult)but it fails with a warning of "Object required"
Any ideas what it's looking for ?
Thanks for your help
Billybong
I've been hacking away at a script to determine if a radio button value is in a list of numbers
Using support from other in the ASP section of the site and from other tutorials on the net and came up with :
Code:
<script>
function whichButton() {
var group1Checked
var myString = "11,12,3,22,18,19,55";
var mySplitResult = myString.split(",");
for(i = 0; i < mySplitResult.length; i++){
document.write("<br /> Element " + i + " = " + mySplitResult[i]);
}
for (var i=0; i<document.survey.optSecenek.length; i++) {
if (document.survey.optSecenek[i].checked) {
group1Checked = document.survey.optSecenek[i].value
}
}
if(!group1Checked) == (!mySplitResult){ //if group1Checked does not equal null
alert("Found You")
}
else{
alert("Not found")
}
}
</script>
I can get the scripts working seperately i.e. I have learnt now how to split the variable and display the results.
I have also been able to determine the value of a dynamic number of radio buttons and display the value - so I added the two scripts together with a few edits to determine if (!group1Checked) == (!mySplitResult)but it fails with a warning of "Object required"
Any ideas what it's looking for ?
Thanks for your help
Billybong