Window pop up sometimes doesn't work

TheWizardofInt

Well-known member
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
This code works in my main.aspx:

Code:
    Public Sub ShowPend(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim sWindow As String = "mywindow"
        Dim jscript As String = "<script language=JavaScript>mywindow = window.open(/gmconnect/schedule.aspx," + sWindow + ",height=350,width=532,toolbars=no,resizable=no)</script>"
        Session("CalContact") = txtContact.Text
        Session("OnDate") = DateString
        Session("CompStat") = Session("sPassRec")
        RegisterClientScriptBlock("mywindow", jscript)
    End Sub

But not from any other page.

Anything that I might have as a criteria on my main page that I might need to set for the other pages and didnt?

Thanks
 
That didnt work either.

I do send this window from another window, which is opened with the same method, and I do have to close this second window

Any other ideas
 
So you say your function is in another aspx file than your aspx that needs the script?

if you Register a script in 1 window to be activated in another, youll run into trouble. It cannot be done. RegisterScript is happening at runtime, so it must be in the page that needs it clientside.
 


Write your reply...
Back
Top