Hi, there
I have used the following jQuery code to successfully set the default value of a list(radio) question based on the passthrough value. However, after I added <script src="
code.jquery.com/jquery-1.7.1.min.js
"> before the following code, the default value was no longer set. Any hint? Thanks!
<script type="text/javascript" charset="utf-8">
//The code is put in the help box
var passStr = "{INSERTANS:527775X3X21}";
var passNum = passStr.replace(/<\/?[^>]+(>|$)/g, "");
if (passNum != null) {
var qID = {QID};
$('#question'+qID+' input.radio:eq('+passNum+')').click();
}
</script>