SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    May 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Show a user-requested popup?

    Is there any javascript that can show a popup after a link is clicked which will not be blocked by blockers?

    I have a guestbook but the form/table is small and it only looks good in a 320x240 small window.

  2. #2
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Greybox my friend, Greybox...
    FOR SALE: 1 set of morals, never used, will sell cheap

  3. #3
    SitePoint Member
    Join Date
    May 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is that the menu that has the link is in an iframe.
    Will this show the window in the parent page?

    I've been using highslide JS but has the same problem. That's why I need an actual browser window. But even _blank call methods are blocked

  4. #4
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all: if you can, do it without (i)frames. They're plain evil.

    You put the script etc of Greybox in the parent page and add a line to the end of the script of Greybox:
    Code:
    window.GB_showCenter = GB_showCenter;
    Now you can use something like this in the frame:
    Code:
    <a href="http://www.google.com" onclick="return window.parent.GB_showCenter('Google', this.href)">Show box</a>
    FOR SALE: 1 set of morals, never used, will sell cheap

  5. #5
    SitePoint Member
    Join Date
    May 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, and how can I set the dimensions of the window?

  6. #6
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <a href="http://www.google.com" onclick="return window.parent.GB_showCenter('Google', this.href, 320, 240)">Show box</a>
    For further information: http://orangoo.com/labs/GreyBox/Documentation/
    FOR SALE: 1 set of morals, never used, will sell cheap

  7. #7
    SitePoint Member
    Join Date
    May 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    great, this works wonders.
    I guess regular popups are getting even more deprecated...


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
  •