Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. javascript:window.open, won't

javascript:window.open, won't

Scheduled Pinned Locked Moved Web Development
databasecsharpjavascripthtmlasp-net
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goodideadave
    wrote on last edited by
    #1

    I am having an intermittent problem showing a new window from an ASP.NET page (and yes, they already chased me off the ASP.NET forum) with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it usually works on another users' system, and it never works on yet another users' system. Apparently, no one has any popup blockers installed, but the user is in another city so I haven't verified that. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). I am unsure where to look next. In page_load: const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',"; const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;"; lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs; Any ideas? Thanks.

    Someone's gotta be the last to know, but why is it always me?

    V 1 Reply Last reply
    0
    • G goodideadave

      I am having an intermittent problem showing a new window from an ASP.NET page (and yes, they already chased me off the ASP.NET forum) with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it usually works on another users' system, and it never works on yet another users' system. Apparently, no one has any popup blockers installed, but the user is in another city so I haven't verified that. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). I am unsure where to look next. In page_load: const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',"; const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;"; lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs; Any ideas? Thanks.

      Someone's gotta be the last to know, but why is it always me?

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Did the web browser show any exclamation symbol near the system tray or any information bars near the top when the link was clicked?

      Vasudevan Deepak Kumar Personal Homepage
      Tech Gossips
      A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

      G 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        Did the web browser show any exclamation symbol near the system tray or any information bars near the top when the link was clicked?

        Vasudevan Deepak Kumar Personal Homepage
        Tech Gossips
        A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson

        G Offline
        G Offline
        goodideadave
        wrote on last edited by
        #3

        Nope, I'm not seeing any jscript errors. And like I said it works on other machines, just not this one.

        Someone's gotta be the last to know, but why is it always me?

        G 1 Reply Last reply
        0
        • G goodideadave

          Nope, I'm not seeing any jscript errors. And like I said it works on other machines, just not this one.

          Someone's gotta be the last to know, but why is it always me?

          G Offline
          G Offline
          goodideadave
          wrote on last edited by
          #4

          I am still having a problem showing a new window with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it always works on another users' system, and it never works on yet another users' system. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page in an asp:Literal control. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). There are no popup blockers on the suspect system, and other window.opens work. I am unsure where to look next. This link works: const string cOnClientClickTemplate = "javascript:window.open('ClaimPopup.aspx?CompPK={0}&ProviderName={1}&FundType={2}',"; const string cPopupDialogArgs = "'newWindow','width=500,height=450');return false;"; NewDiscClaim.OnClientClick = String.Format(cOnClientClickTemplate, ViewState["CompPK"].ToString (), ViewState["ProviderName"].ToString(), "disc") + cPopupDialogArgs; This link does not work: const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',"; const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;"; lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs; Any ideas? Thanks.

          Someone's gotta be the last to know, but why is it always me?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups