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. ASP.NET
  4. javascript:window.open, won't

javascript:window.open, won't

Scheduled Pinned Locked Moved ASP.NET
databasejavascripthtmlhelpquestion
7 Posts 4 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 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. 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?

    P 1 Reply Last reply
    0
    • G goodideadave

      I am having an intermittent 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 usually 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. 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?

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Your question has nothing to do with ASP.NET. Javascript questions should be posted in the Web Development forum.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      G 1 Reply Last reply
      0
      • P pmarfleet

        Your question has nothing to do with ASP.NET. Javascript questions should be posted in the Web Development forum.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

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

        Well, the problem is occurring on an ASP.NET page, so.... :|

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

        P G C 3 Replies Last reply
        0
        • G goodideadave

          Well, the problem is occurring on an ASP.NET page, so.... :|

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

          P Offline
          P Offline
          pmarfleet
          wrote on last edited by
          #4

          goodideadave wrote:

          Well, the problem is occurring on an ASP.NET page, so....

          So what? That doesn't make it an ASP.NET question. The fact that you are using Javascript in conjunction with ASP.NET is irrelevent. Your question is Javascript-specific, it belongs in the Web Development forum.

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          1 Reply Last reply
          0
          • G goodideadave

            Well, the problem is occurring on an ASP.NET page, so.... :|

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

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            goodideadave wrote:

            Well, the problem is occurring on an ASP.NET page, so....

            Are you doing this professionally? Then perhaps the "Work and Training Issues" would be a good forum? Is this occuring on a computer? Perhaps the "Hardware / Device Drivers" forum would fit? ;)

            Despite everything, the person most likely to be fooling you next is yourself.

            1 Reply Last reply
            0
            • G goodideadave

              Well, the problem is occurring on an ASP.NET page, so.... :|

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

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              So, I guess you need to do a little bit of reading to understand where the line is, what ASP.NET is, what it does, and what questions are generic to all web apps (hint: ones that relate to javascript, css and HTML )

              Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              G 1 Reply Last reply
              0
              • C Christian Graus

                So, I guess you need to do a little bit of reading to understand where the line is, what ASP.NET is, what it does, and what questions are generic to all web apps (hint: ones that relate to javascript, css and HTML )

                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

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

                Clearly I have erred. Thank you so very much for pointing me in the right direction.

                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