I have an instance where i need to call some javscript from my code behind file, and when I do, no other fucntions work on the page anymore. My radmenu no longer works and all the ajaxtool kit stuff i have operating no longer work as well. I put everything in a radScriptBlock but the same result. how can I resolve this problem. This command does nothing with the menu system, it just opens up a div if a value equals 1. I need to call in code behind only in certain instance but it disables everything else and should not.
If myDataTable.Rows.Count > 0 Then
If myDataTable.Rows(0)(2) = "True" Then
FILLDDL() 'Fill the drop down lists
rblReported.SelectedValue = 1
ScriptManager.RegisterStartupScript(Me.Page, GetType(String), "OpenDiv", "OpenDiv();", True)
Else
rblReported.SelectedValue = 0
End If
Else
End If
function OpenDiv() {
var rbl = document.getElementById("<%=rblReported.ClientID%>");
var radios = rbl.getElementsByTagName("input");
var div = document.getElementById("Recruited");
var forms = document.getElementById("printform");
var Recheader = document.getElementById("RecInfo");
var Selval
for (var i = 0; i < radios.length; i++) {
if (radios[i].checked) {
Selval = radios[i].value;
if (Selval == 1) {
div.style.display = "inline";
forms.style.display = "inline";
Recheader.style.display = "inline";
}
else if (Selval == 0) {
div.style.display = "none";
forms.style.display = "none";
Recheader.style.display = "none";
}
}
}
}