html target help appreciated

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BrettJ
    ol' timer
    • Jan 2001
    • 4715

    #1

    html target help appreciated

    i want to open all links off of one page into a new window.

    right now i'm using target="_base"

    but I would really like to open all the links into the same window. And better yet i would like that new window to be opened up in a certain location on the surfers monitor. Possible? what would the new code be?
  • grumpy
    Too lazy to set a custom title
    • Jan 2002
    • 9870

    #2
    window.open("the url","anyname","width=800,height=600,top=1,left=1" )

    in a link it would like <a href=javascript:window.open(("the url","anyname","width=800,height=600,top=1,left=1" )>text</a>

    does not work with earlie browser.


    keep the anyname the same...to keep loading the pages in the same window
    Don't let greediness blur your vision | You gotta let some shit slide
    icq - 441-456-888

    Comment

    • Steve
      Confirmed User
      • Feb 2001
      • 6894

      #3
      use target="new" and all the links will continue to open in that same window, instead of a brand new blank browser window.
      I think you can just do that with a BASE TARGET="_new" in the HEAD section, too


      put his in the head section

      script
      !--
      function openScript(url, width, height) {
      var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no' );
      }
      //--
      /script

      with <> around the script parts
      and add this to the anchor tags a href

      javascript:openScript('put the URL here',500,720)

      replace the height and width dimesions with whatever you need them to be

      Comment

      • BrettJ
        ol' timer
        • Jan 2001
        • 4715

        #4
        So i have to put the - - javascript:openScript - in each link's a href that I want to open in a specific location??

        Comment

        Working...