collapsible panel and window.open javascript in ASP.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ting ting
    New Member
    • Sep 2007
    • 15

    collapsible panel and window.open javascript in ASP.net

    I am working on a ASP.net 2.0 version and I want to click a button to open a window. I was using window.open to write at vb side.
    Response.Write( "<Script language='JavaS cript'>window.o pen('Report.asp x"')</Script>")

    It works fine and open the Report.aspx at another window, however, my parent window contains a collapsible panel which can't function after clicking that button. Why is it happen? Can the collapsible panel and window.open work together?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Using Response.Write( ) has a habbit of overwriting designer code.
    Look for ways to insert it normally.

    Such as the onClientClick function of buttons.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by ting ting
      I am working on a ASP.net 2.0 version and I want to click a button to open a window. I was using window.open to write at vb side.
      Response.Write( "<Script language='JavaS cript'>window.o pen('Report.asp x"')</Script>")

      It works fine and open the Report.aspx at another window, however, my parent window contains a collapsible panel which can't function after clicking that button. Why is it happen? Can the collapsible panel and window.open work together?

      Instead of using Response.Write try using :

      BTN_OpenInNewWi ndow.Attributes .Add("onclick", "JavaScript:win dow.open('Repor t.aspx');")

      If you're still having problems after that let us know.

      Comment

      • ting ting
        New Member
        • Sep 2007
        • 15

        #4
        Originally posted by Frinavale
        Instead of using Response.Write try using :

        BTN_OpenInNewWi ndow.Attributes .Add("onclick", "JavaScript:win dow.open('Repor t.aspx');")

        If you're still having problems after that let us know.

        Thanks Frinavale! It really works when using this statement!

        Comment

        • kirankva
          New Member
          • Sep 2008
          • 1

          #5
          Originally posted by ting ting
          Thanks Frinavale! It really works when using this statement!
          Hi i am also facing similar problem, but i have done the same way that has been suggested. This doesn't work for me.

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Originally posted by kirankva
            Hi i am also facing similar problem, but i have done the same way that has been suggested. This doesn't work for me.
            Could you please provide more details about your problem so that we can help you better. Include details like what you have tried so far, what do you think might be the cause to the problem etc.

            -Frinny

            Comment

            Working...