SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey guys. Yet another question.

    I was thinking about keeping a pop-up always on top for my one site. Anyway I could do that. Like, on a 'lostFocus' type of event, give the window focus? Just an idea..basically like a "well, that would be nice" kind of thing.

    Any help, as always, is greatly appreciated. Thanks in advance!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  2. #2
    SitePoint Member
    Join Date
    Mar 2001
    Location
    London
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd do it just like you suggested; use the window 'onblur' event and give the focus right back.

    I wonder if you can do it just like this - this.onblur=this.focus ?

  3. #3
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,

    Without looking at my JavaScript book, or another reference, I think there is a property in the open() method called alwaysRaised, but I know that this method requires a signed script.

    So, your next best bet is to focus something when it's blurred. You have two choiced.

    1. On the new page that's open, include this in your body tag, like:

    Code:
    <body onblur="window.focus()">
    2. Stick this in your code to open up the window:

    Code:
    newWin = window.open("someURL","someName","attributes....");
    newWin.onblur = newWin.focus;
    aDog

  4. #4
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, guys...

    Listen, one question.

    I already have an example. Check it out at:
    http://www.InterFall.com/Franklin/index.asp

    Click on the weather picture. The window pops up.

    Now, my question is: is there any way I could keep it popped up, like in front of the other window, while the user can scroll in the other window? Check out the example as it is now for a clearer picture of what I'm trying to do. Check it out.

    Thanks!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  5. #5
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    geez,...goober..that is cool...i was wondering what happened to my com....and i realised it was the onblur focus thing...for the window..quite annoying..yet..interesting.

    nope...unfortunately i don't have a solution to the scrolling..
    why don't you load it in a frame instead of all these fancy stuffs?
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  6. #6
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, it's not necessary.

    I'll live without it. I didn't mean to make the window stay that way.

    Should've removed that code.

    Thanks anyways, guys!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  7. #7
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ha!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    goober...

    If I was your user and you did that to me, I would be pisssssed. and I don't mean drunk (for all you UK'ers and Aussies).
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    I believe you have my stapler. scrubz's Avatar
    Join Date
    Feb 2001
    Location
    Van down by the river
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I agree. If the popup kept focusing when I was trying to do something else, I would be a bit bothered.

    Goober - have you thought about taking the opposite approach and having the weather open it's own window? Your site could still remain, and when the user is done with the weather, they close the weather window and there's your site, right where they left it.

  10. #10
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    edited for spelling

    you're correct...It was a bad piece of code, and a design flaw, and I think it has since been corrected.

    By the way, I don't HAVE many users as of yet.

    Also, I meant for the other window (the parent/opener) to be scrollable. That way it would simply be like a nice window to get people to return to the site while they were browsing (maybe? well, that's what I HOPED).

    You see, my problem is the stereotypical 'stupid user'. Now, of course I'm trying to be funny, but it's somewhat true. The first person I showed the feature to (the COMPUTER TEACHER, even), the first thing they said when they clicked on the parent window was "Where did the pop-up go?", not realizing that it had indeed moved right down to their start bar. I mean, sheesh.

    Oh well. Thanks for the input, guys!
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  11. #11
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol
    yeha....nice feat..i didn't know it could do such a thing though
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  12. #12
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by lynlimz
    lol
    yeha....nice feat..i didn't know it could do such a thing though
    What's "it" in that sentence? I'm unclear as to what you mean.

    */me hates pronouns*.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  13. #13
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It? the ability to continuously focus on the window!
    haha...I never liked letting the cat out of the bag...hence the usage of its............*grin* poof!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •