Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPage.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','Page.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','
Previous
 
Next
New Post
9/20/2016 5:26 AM
 

Hi fellow DNN'ers,

I have a problem with this code:

Page.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

It runs perfectly fine on my localhost, but nothing happens when I run it on my hosted live portal.

I also tried several other snippets, but not one does the trick:

Me.Page.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'Me.Page.ClientScript.RegisterClientScriptBlock

'ScriptManager.RegisterStartupScript(Me.Parent.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'System.Web.UI.ScriptManager.RegisterStartupScript(Me.Parent.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'System.Web.UI.ScriptManager.RegisterClientScriptBlock(Me.Parent.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

'System.Web.UI.ScriptManager.RegisterClientScriptBlock(Me.Page, Me.GetType(), "open", "window.open('" & strRedirectTo & "','','height=600,width=800');", True)

I'm stuck........

Please advise.

Thanks,

Jos


jos Richters www.visualdata.nl
 
New Post
9/21/2016 4:36 AM
 

Hello out there,

I did some more experimenting, but NO result:

In the HTML part I put:

'============================================

 

script type="text/javascript"

function TurnCarousel() {

window.open("http://www.w3schools.com", "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");

}

/script

'============================================

and a button: Button ID="btnTurnCarousel" Text="Turn Carousel" runat="server" OnClick="TurnCarousel"

In the CodeBehind (VB .Net) is the routine:

'============================================

Protected Sub TurnCarousel(sender As Object, e As EventArgs)

Dim script2 As String = "window. = function() { TurnCarousel(); };"

Page.ClientScript.RegisterStartupScript(Me.GetType(), "TurnCarousel", script2, True)

End Sub

'============================================ 

So, when I click the button, I would expect that the www.w3schools.com page would open in a new window.

But nothing happens!

What can be wrong?

Thanks,

Jos


jos Richters www.visualdata.nl
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPage.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','Page.ClientScript.RegisterStartupScript(Me.GetType(), "open", "window.open('" & strRedirectTo & "','


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out