R
richard
OK,
Im working with a DataList in .Net 2.0, the code shows the list when
the query has executed. I have the page feature in its own div and
display:none so its not visible until the list shows. Ive written
javascript in ASP.Net to show the DIV. The code is as follows:
jScript = "<script LANGUAGE=""javascript"">" & vbNewLine
jScript = jScript & "function ToggleDiv(id){" & vbNewLine
jScript = jScript & "var elem = document.getElementById(id);" &
vbNewLine
jScript = jScript & "if (elem)" & vbNewLine
jScript = jScript & "{" & vbNewLine
jScript = jScript & " if (elem.style.display != 'block')" &
vbNewLine
jScript = jScript & " {" & vbNewLine
jScript = jScript & " elem.style.display = 'block';"
&vbNewLine
jScript = jScript & " elem.style.visibility = 'visible';"
& vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & " else" & vbNewLine
jScript = jScript & " {" & vbNewLine
jScript = jScript & " elem.style.display =
'none';" & vbNewLine
jScript = jScript & " elem.style.visibility =
'hidden';" & vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & "}" & vbNewLine
jScript = jScript & "ToggleDiv('Page_Div');" & vbNewLine
jScript = jScript & "</sc" & "ript>"
Response.Write(jScript)
I dont get any errors, but the javascript doesn't execute either.
Anyone have any ideas?
Im working with a DataList in .Net 2.0, the code shows the list when
the query has executed. I have the page feature in its own div and
display:none so its not visible until the list shows. Ive written
javascript in ASP.Net to show the DIV. The code is as follows:
jScript = "<script LANGUAGE=""javascript"">" & vbNewLine
jScript = jScript & "function ToggleDiv(id){" & vbNewLine
jScript = jScript & "var elem = document.getElementById(id);" &
vbNewLine
jScript = jScript & "if (elem)" & vbNewLine
jScript = jScript & "{" & vbNewLine
jScript = jScript & " if (elem.style.display != 'block')" &
vbNewLine
jScript = jScript & " {" & vbNewLine
jScript = jScript & " elem.style.display = 'block';"
&vbNewLine
jScript = jScript & " elem.style.visibility = 'visible';"
& vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & " else" & vbNewLine
jScript = jScript & " {" & vbNewLine
jScript = jScript & " elem.style.display =
'none';" & vbNewLine
jScript = jScript & " elem.style.visibility =
'hidden';" & vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & " }" & vbNewLine
jScript = jScript & "}" & vbNewLine
jScript = jScript & "ToggleDiv('Page_Div');" & vbNewLine
jScript = jScript & "</sc" & "ript>"
Response.Write(jScript)
I dont get any errors, but the javascript doesn't execute either.
Anyone have any ideas?