SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Putting a link inside a new window

    Hello!

    I've a Open Browser Window ( suppose 300x300 ), and inside that new window there are 3 links, each one for a site.
    Each link has its url and _blank target, but the pages are open in a window like 300 x 300. What I want is to be open in a normal window, and not within the small square dimension.

    Any help?

    Thanks.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    New windows inherit the dimensions of their parents.
    You will need to record the dimensions of the original window and use those as parameters for the links in the new window
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    New windows inherit the dimensions of their parents.
    You will need to record the dimensions of the original window and use those as parameters for the links in the new window

    Yeah.. So I've to do a new Open Browser, instead of a "a href" tag?

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    You should still use the href for when javascript isn't available.
    Just override the link with an onclick event that returns false back to the link, to cancel the default link action. Before returning false the function for that event can open the new window
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •