Running javascript function from a link in an asp.net calender

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone please shed some light on this for me, I have tried using
RegisterStartupScript and I cant get it to work.

The purpose of this is that the calendar is displaying info from a db and
when a link on the calendar is clicked it will open a popup window displaying
that info.

Thanks in advance.

Danny
 
Danny,

I don't know how you want to use it (I have the idea that this sample looks
like it).

\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim str As String
If Not IsPostBack Then
TextBox1.ForeColor = Color.White
TextBox1.BorderStyle = BorderStyle.None
Dim alertScript As String = _
"<script language=JavaScript>document.all.item('TextBox1').value
" & _
" = prompt('Give me text','My name is nobody'); </script>"
RegisterStartupScript("Startup", alertScript)
Else
str = TextBox1.Text
End If
End Sub
///

I hope this helps a little bit?

Cor
 
Back
Top