D
Dave
I have a vb routine below where I'm trying to capture a name from a
javascript prompt box. My application is inline VB on Visual Studio 2003.
The prompt box does display, but when I type a string and hit OK or Cancel,
the value 'ret' which I want to hold the value of the string, is always
empty. And the status bar always says "Done but with errors on page."
If I use a simpler control like alert or confirm, I get no problems.
Can someone point out my error, either conceptual, syntactical, or whatever?
Thanks,
Dave
Sub GetUsername()
Dim ret as String 'This is the value I want to capture
Dim msg As String = "Type your name"
Dim sKey As String = "sKey"
Dim alertScript As String = "<script language=JavaScript runat=server>
'" & ret & "' = prompt('" & msg & "'); <" & "/script>"
RegisterClientScriptBlock(sKey, alertScript)
End Sub
javascript prompt box. My application is inline VB on Visual Studio 2003.
The prompt box does display, but when I type a string and hit OK or Cancel,
the value 'ret' which I want to hold the value of the string, is always
empty. And the status bar always says "Done but with errors on page."
If I use a simpler control like alert or confirm, I get no problems.
Can someone point out my error, either conceptual, syntactical, or whatever?
Thanks,
Dave
Sub GetUsername()
Dim ret as String 'This is the value I want to capture
Dim msg As String = "Type your name"
Dim sKey As String = "sKey"
Dim alertScript As String = "<script language=JavaScript runat=server>
'" & ret & "' = prompt('" & msg & "'); <" & "/script>"
RegisterClientScriptBlock(sKey, alertScript)
End Sub