open a new browser window without using javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bushi

    open a new browser window without using javascript

    hi everyone!
    i have diplayed my hyperlinks in a iframe.when i redirect
    to next page.the next page also open in the same frame,but i want to
    open a new browser window,when i click on the link.actually i 'm using
    link button control to diplay the hyperlinks.i cant use java script
    "window.open()" .i need some server side code behind the linkbutton,if
    any one knows plz rply soon.

  • Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

    #2
    Re: open a new browser window without using javascript

    Without JavaScript your only real solution is to use a hyperlink with the
    target attribute set:
    <a href="MyPage.as px?myparm=1" target="_blank" >Click Me</a>
    Now this doesn't post back the originating page to the server, however in
    the above example MyPage.aspx will cause a server page request and you can
    pass it querystring parameters, so in many cases this will work to both open
    a new window and process server side code.

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    HALOJP kasih bocoran daftar pilihan produk desain interior bertekstur unik khusus buat referensi proyek bangunan impian kamu tanpa perlu ribet cari lagi.



    "bushi" <bushras84@gmai l.comwrote in message
    news:1176532603 .365940.197220@ y5g2000hsa.goog legroups.com...
    hi everyone!
    i have diplayed my hyperlinks in a iframe.when i redirect
    to next page.the next page also open in the same frame,but i want to
    open a new browser window,when i click on the link.actually i 'm using
    link button control to diplay the hyperlinks.i cant use java script
    "window.open()" .i need some server side code behind the linkbutton,if
    any one knows plz rply soon.
    >

    Comment

    • bushi

      #3
      Re: open a new browser window without using javascript

      On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
      <S...@Orr.netwr ote:
      Without JavaScript your only real solution is to use a hyperlink with the
      target attribute set:
      <a href="MyPage.as px?myparm=1" target="_blank" >Click Me</a>
      Now this doesn't post back the originating page to the server, however in
      the above example MyPage.aspx will cause a server page request and you can
      pass it querystring parameters, so in many cases this will work to both open
      a new window and process server side code.
      >
      --
      I hope this helps,
      Steve C. Orr,
      MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
      >
      "bushi" <bushra...@gmai l.comwrote in message
      >
      news:1176532603 .365940.197220@ y5g2000hsa.goog legroups.com...
      >
      >
      >
      hi everyone!
      i have diplayed my hyperlinks in a iframe.when i redirect
      to next page.the next page also open in the same frame,but i want to
      open a new browser window,when i click on the link.actually i 'm using
      link button control to diplay the hyperlinks.i cant use java script
      "window.open()" .i need some server side code behind the linkbutton,if
      any one knows plz rply soon.- Hide quoted text -
      >
      - Show quoted text -
      thanx steve!
      but i can't got ur point,i have solved my problem by using the
      following code snippet:

      Response.Write( "<script type='text/
      javascript'>det ailedresults=wi ndow.open('ad2. html');</script>");

      a little bit problem remains.i want to use variable instead of the
      hardcoded page address,as above i have used 'ad2.html'.actu ally i have
      to select the value at run time,
      as

      Response.Write( "<script type='text/
      javascript'>det ailedresults=wi ndow.open(page) ;</script>");

      when i use this piece of code,the page is not redirected.i can solve
      it by checking the value of page using if conditions and then use the
      address of the corresponding page.
      but i dont like such type of hardcoding,if u hav any idea other then
      mine plz recommend me,i will wait 4 ur rply anxiously

      Comment

      • Mark Rae

        #4
        Re: open a new browser window without using javascript

        "bushi" <bushras84@gmai l.comwrote in message
        news:1176540883 .311697.300720@ n59g2000hsh.goo glegroups.com.. .
        thanx steve!
        but i can't got ur point,
        Steve's point is that he was actually trying to answer your question i.e.
        how to open a new browser window without using JavaScript - that's what you
        said you were looking for...

        i have solved my problem by using the
        following code snippet:
        >
        Response.Write( "<script type='text/
        javascript'>det ailedresults=wi ndow.open('ad2. html');</script>");
        There's the problem... You ask for help in opening a new browser window
        without using JavaScript (note the title of this thread which you started),
        and then you say that you have solved it by using JavaScript...


        Comment

        • Norman Yuan

          #5
          Re: open a new browser window without using javascript

          The new window you are trying to open by streaming javascript from server to
          browser will be treated as "bad or unwanted" pop-ups and would be blocked by
          most browser by default.

          Only client-side started new window due to user's explicit action(cliking)
          on client-side is considered "good" pop-up. So, you better follow Steve's
          suggestion if you really hate "javascript ", or just use client-side
          javascript, there is nothing wrong to use it, and you used it in your found
          solution anyway.

          "bushi" <bushras84@gmai l.comwrote in message
          news:1176540883 .311697.300720@ n59g2000hsh.goo glegroups.com.. .
          On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
          <S...@Orr.netwr ote:
          >Without JavaScript your only real solution is to use a hyperlink with the
          >target attribute set:
          ><a href="MyPage.as px?myparm=1" target="_blank" >Click Me</a>
          >Now this doesn't post back the originating page to the server, however in
          >the above example MyPage.aspx will cause a server page request and you
          >can
          >pass it querystring parameters, so in many cases this will work to both
          >open
          >a new window and process server side code.
          >>
          >--
          >I hope this helps,
          >Steve C. Orr,
          >MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
          >>
          >"bushi" <bushra...@gmai l.comwrote in message
          >>
          >news:117653260 3.365940.197220 @y5g2000hsa.goo glegroups.com.. .
          >>
          >>
          >>
          hi everyone!
          i have diplayed my hyperlinks in a iframe.when i redirect
          to next page.the next page also open in the same frame,but i want to
          open a new browser window,when i click on the link.actually i 'm using
          link button control to diplay the hyperlinks.i cant use java script
          "window.open()" .i need some server side code behind the linkbutton,if
          any one knows plz rply soon.- Hide quoted text -
          >>
          >- Show quoted text -
          >
          thanx steve!
          but i can't got ur point,i have solved my problem by using the
          following code snippet:
          >
          Response.Write( "<script type='text/
          javascript'>det ailedresults=wi ndow.open('ad2. html');</script>");
          >
          a little bit problem remains.i want to use variable instead of the
          hardcoded page address,as above i have used 'ad2.html'.actu ally i have
          to select the value at run time,
          as
          >
          Response.Write( "<script type='text/
          javascript'>det ailedresults=wi ndow.open(page) ;</script>");
          >
          when i use this piece of code,the page is not redirected.i can solve
          it by checking the value of page using if conditions and then use the
          address of the corresponding page.
          but i dont like such type of hardcoding,if u hav any idea other then
          mine plz recommend me,i will wait 4 ur rply anxiously
          >

          Comment

          • Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

            #6
            Re: open a new browser window without using javascript

            I've never seen anyone contradict themself so many times with just two
            posts.
            You explicitly said you need a solution that doesn't just JavaScript or the
            window.open method.
            Then you ignore my advice that met your requirements and you instead use the
            JavaScript window.open method.
            But, hey, whatever you're happy with dude.

            --
            I hope this helps,
            Steve C. Orr,
            MCSD, MVP, CSM, ASPInsider
            HALOJP kasih bocoran daftar pilihan produk desain interior bertekstur unik khusus buat referensi proyek bangunan impian kamu tanpa perlu ribet cari lagi.



            "bushi" <bushras84@gmai l.comwrote in message
            news:1176540883 .311697.300720@ n59g2000hsh.goo glegroups.com.. .
            On Apr 14, 12:10 pm, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
            <S...@Orr.netwr ote:
            >Without JavaScript your only real solution is to use a hyperlink with the
            >target attribute set:
            ><a href="MyPage.as px?myparm=1" target="_blank" >Click Me</a>
            >Now this doesn't post back the originating page to the server, however in
            >the above example MyPage.aspx will cause a server page request and you
            >can
            >pass it querystring parameters, so in many cases this will work to both
            >open
            >a new window and process server side code.
            >>
            >--
            >I hope this helps,
            >Steve C. Orr,
            >MCSD, MVP, CSM, ASPInsiderhttp://SteveOrr.net
            >>
            >"bushi" <bushra...@gmai l.comwrote in message
            >>
            >news:117653260 3.365940.197220 @y5g2000hsa.goo glegroups.com.. .
            >>
            >>
            >>
            hi everyone!
            i have diplayed my hyperlinks in a iframe.when i redirect
            to next page.the next page also open in the same frame,but i want to
            open a new browser window,when i click on the link.actually i 'm using
            link button control to diplay the hyperlinks.i cant use java script
            "window.open()" .i need some server side code behind the linkbutton,if
            any one knows plz rply soon.- Hide quoted text -
            >>
            >- Show quoted text -
            >
            thanx steve!
            but i can't got ur point,i have solved my problem by using the
            following code snippet:
            >
            Response.Write( "<script type='text/
            javascript'>det ailedresults=wi ndow.open('ad2. html');</script>");
            >
            a little bit problem remains.i want to use variable instead of the
            hardcoded page address,as above i have used 'ad2.html'.actu ally i have
            to select the value at run time,
            as
            >
            Response.Write( "<script type='text/
            javascript'>det ailedresults=wi ndow.open(page) ;</script>");
            >
            when i use this piece of code,the page is not redirected.i can solve
            it by checking the value of page using if conditions and then use the
            address of the corresponding page.
            but i dont like such type of hardcoding,if u hav any idea other then
            mine plz recommend me,i will wait 4 ur rply anxiously
            >

            Comment

            • Thomas  Hansen

              #7
              Re: open a new browser window without using javascript

              On Apr 15, 12:49 am, "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]"
              <S...@Orr.netwr ote:
              I've never seen anyone contradict themself so many times with just two
              posts.
              You explicitly said you need a solution that doesn't just JavaScript or the
              window.open method.
              Then you ignore my advice that met your requirements and you instead use the
              JavaScript window.open method.
              When we're at it, that's no window, THIS is a window:

              (click the "Start Chatting" button")

              ..t

              Comment

              Working...