R
Red
I am trying to call some java script from an ASP:Checkbox control.
My code is as follows:
Dim PilotCheckScript As String = "<script language=javascript >" & vbCrLf &
_
"function PilotCheckChanged(){" & vbCrLf & "alert(""Check Changed!"");" &
vbCrLf & _
"txtPILOT.Enabled = !chkPILOT.Checked;" & vbCrLf & "}" _
& vbCrLf & "</script>"
Me.Page.RegisterClientScriptBlock("PilotCheckChangedScript",
PilotCheckScript)
Me.chkPilot.Attributes("OnCheckChanged") = "JavaScriptilotCheckChanged();"
The code compiles fine and the web form comes up but nothing happens when
the OnCheckChanged event is fired.
Any help is greatly appreciated.
TIA.
My code is as follows:
Dim PilotCheckScript As String = "<script language=javascript >" & vbCrLf &
_
"function PilotCheckChanged(){" & vbCrLf & "alert(""Check Changed!"");" &
vbCrLf & _
"txtPILOT.Enabled = !chkPILOT.Checked;" & vbCrLf & "}" _
& vbCrLf & "</script>"
Me.Page.RegisterClientScriptBlock("PilotCheckChangedScript",
PilotCheckScript)
Me.chkPilot.Attributes("OnCheckChanged") = "JavaScriptilotCheckChanged();"
The code compiles fine and the web form comes up but nothing happens when
the OnCheckChanged event is fired.
Any help is greatly appreciated.
TIA.