SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Im trying to make a simple pop-up so that when someone visits my page it pops up another window to another link. If its possible I would like the window that pops-up to either minimize or goto the background. I know this is easy, but i searched and couldnt find just the simple code. Thanks

  2. #2
    Non-Member spdrcr's Avatar
    Join Date
    Sep 2000
    Location
    Oklahoma City, OK
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure of the code, but you need to think of your audience's reaction to the pop up window. Think of things like..Is this going to be annoying..will it be of use. Things like that. If all it is is a link to another site. Put it somewhere on the page. That's all I hafta say bout that.

    SR

  3. #3
    SitePoint Member
    Join Date
    Jan 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.crays.com/jsc/

    Check this site out. Anything you need to know about pop-up windows is there.

    Rock.
    http://www.web-chix.com

  4. #4
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can download the EMCAscript reference at http://www.devguru.com.

    Although I agree with spdrcr, popups=bad. A couple of trips to a clip art page and you'll lose that desire for a pop-up.

    An alternative is having a DIV that is initially hidden, checks for a cookie and becomes visible if needed. Provide a link to hide the div and you get the same effect without the negative associations that come with a pop-up.

    Aepic

    BTW set the z-index on your DIV to be higher than the rest of the page so that it doesn't effect the rest of your layout.

  5. #5
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I agree with all of you, pop-ups are bad. I hate them, but it has come down to no choice, i had to put one up. My website is on a top50 list and I get a ton of hits but nobody votes. All of the other sites have the top50 list pop-up so they automatically get the votes, but I am missing all of these votes and keep dropping down the list. Ideally I would like to have the window either

    a) pop-up in background
    or
    b) pop-up minimized in the task bar

    Anyone know of a way to do this?

    Thanks

  6. #6
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you call the pop-up window, set the alwaysLowered property to 1. This will cause it to float below all the other windows. I can't find this property in my Javascript book but it is ECMA-262 under window.open (properties).

    Aepic


  7. #7
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Im lost on what your talking about. Can you explain the code a little more, or point me to a good reference.. Thank you

  8. #8
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tested the alwaysLowered code and it doesn't appear to be supported on IE 5 or NN 4 so the next best thing is to add either:

    A) <Body onFocus="window.blur()"> to the pop up window. Set up a frame within the popup if you can't edit the popup's main content.

    B) <Body onBlur="window.focus()"> to the main page. This does have the draw back of annoying some users though.

    BTW, all the code can be found at http://www.devguru.com in downloadable HTML. It's the ECMAscript standard, so some of it is not yet supported.

    Aepic

    Hopefully, the former Squid helped the Devil Dog.
    NSGA


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
  •