Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

This code works in my main.aspx:

 

   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 didn't?

 

Thanks

Read the Fovean Chronicles

Because you just can't spend your whole day programming!

Posted

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, you'll run into trouble. It cannot be done. RegisterScript is happening at runtime, so it must be in the page that needs it clientside.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...