SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having a problem with window closing when it's not supposed to.
    I have a product "tour" that has a "registration" link on every page, that links back to the parent window. When I use the
    onBlur="window.close()"
    and click to go to next page it closes the window.
    How can I get the window to close, only when I click on the "register now" link?
    You can check out the tour here:
    http://www.beaconhealth.org/ehomecare

    I've taken out the "onBlur..."
    FYI- to start the tour - click on the upper right banner.

    Thanks for your time & help

    Chris

  2. #2
    SitePoint Addict
    Join Date
    Mar 2001
    Location
    the windy city
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cschneider,
    I haven't visited your site, but why don't you put the window.close in your link like this:
    <a href="your_page_url" onClick="wondow.close()">...</a>

  3. #3
    SitePoint Member
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    valeria_vi-
    Thanks... but that didn't work. Maybe if you went to the link or here's the code I'm using

    <img src="images/bar_on_10.gif" width="182" height="95" usemap="#Map2" border="0"><map name="Map2"><area shape="rect" coords="7,29,95,82" href="http://www.ehomecare.com/intro/register.asp"target="original"onClick="wondow.close()"></map>
    <br>

    After looking at the code, you would guess human error. That's why I'm the designer... not the programmer.

    Thanks again
    Chris

  4. #4
    Gong!
    Join Date
    May 2000
    Location
    Helsinki, Finland
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by cschneider
    <img src="images/bar_on_10.gif" width="182" height="95" usemap="#Map2" border="0"><map name="Map2"><area shape="rect" coords="7,29,95,82" href="http://www.ehomecare.com/intro/register.asp"target="original"onClick="wondow.close()"></map><br>
    I guess you've spotted it already, but it's window.close(), not wondow.close()
    HighCheats - game cheats, codes, tips and tricks for PC and various console platforms

  5. #5
    SitePoint Addict
    Join Date
    Mar 2001
    Location
    the windy city
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry for the typo (and thanks, hmahonen)
    hope, the problem will be solved now

  6. #6
    SitePoint Member
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - I caught the typo, but it still didn't work for me?????
    Does my code seem correct otherwise?

  7. #7
    SitePoint Member
    Join Date
    Mar 2001
    Location
    NJ
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry my bad! "Brain Fart"
    It works... I didn't clear my cache.

    Thanks again.

  8. #8
    SitePoint Addict
    Join Date
    Mar 2001
    Location
    the windy city
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Chris,
    what exactly doesn't work?

  9. #9
    SitePoint Addict
    Join Date
    Mar 2001
    Location
    the windy city
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by cschneider
    Sorry my bad! "Brain Fart"
    It works... I didn't clear my cache.

    Thanks again.
    happens to me quite often (more often than I wished lol )

  10. #10
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to specify the window:
    Code:
    onBlur="window.close(this.window);"
    Hope that helps!

  11. #11
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eh no, you don't need to specify the window.


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
  •