Hey there,
This may be an ASP question but i think it is more of a JS question.
I have a web form that i want to have database values loaded into. I have (and want) the form defaulting to unfilled. I now have it checking and updating most the fields if a recordId is added into the url using ASP. My problem lies in changing the radio values.
Here are some snipets of what I have to try to do this that isn't working.
-here is how i have the radios set up
-here is the JS function
-here is how i am calling it from ASP within the bottom of the form.
that second line produces setRadio(this.f orm,'yes'); if printed out to the screen
I also tried testing it hardcoding the function call in JS as
And this didn't work either.
If anyone can help me it would be greatly appericiated!!
This may be an ASP question but i think it is more of a JS question.
I have a web form that i want to have database values loaded into. I have (and want) the form defaulting to unfilled. I now have it checking and updating most the fields if a recordId is added into the url using ASP. My problem lies in changing the radio values.
Here are some snipets of what I have to try to do this that isn't working.
-here is how i have the radios set up
Code:
Yes <input name="isDelegate" type="radio" value="yes" onclick="changeDiv('delegate','block')" />
No <input name="isDelegate" type="radio" value="no" onclick="changeDiv('delegate','none')" checked="checked" />
-here is the JS function
Code:
function setRadio(FormObj,stringvalue) {
If(stringvalue == 'yes'){
FormObj.isDelegate[0].checked = true;
}
}
-here is how i am calling it from ASP within the bottom of the form.
Code:
<%
Response.write("<script type='text/javascript'>")
Response.write("setRadio(this.form,'" & GR("isDelegate") & "');")
Response.write("</script>")
%>
I also tried testing it hardcoding the function call in JS as
Code:
<script type="text/javascript">
setRadio(this.form,'yes');
</script>
If anyone can help me it would be greatly appericiated!!
Comment