Closed Thread
Results 1 to 12 of 12

Thread: Click to Close

  1. #1
    NLC Blank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond repute Blank Verse's Avatar
    Join Date
    Aug 2001
    Location
    Calgary
    Posts
    13,137

    Wink Click to Close

    I've got on my page the classic "click-the-image-to-close-the-browser-thingy". My problem is, when I click the image, it tells me this:

    "the web page you are trying to visit is trying to close the window

    do you want to close the window?"


    See, now if I click OK, it'll close the window, no problem. But I don't want that prompt coming up, what do I do to prevent this?

    This is the code:

    <form>
    <img src="close.jpg" onClick="window.close()">
    </form>

    any ideas?
    Quote Originally Posted by PHPRalph View Post
    Greetings?!?!
    Condign got to this part and am looking saucy to chilling gone from concluded here and hainging with all

  2. #2
    NLC Bruce is a glorious beacon of lightBruce is a glorious beacon of lightBruce is a glorious beacon of lightBruce is a glorious beacon of lightBruce is a glorious beacon of lightBruce is a glorious beacon of light Bruce's Avatar
    Join Date
    Dec 2000
    Location
    Maine
    Posts
    12,147
    You can't close a window with javascript unless the window was opened with javascript.

    If you try to, you'll see the message you posted. I don't know of any other work-arounds.
    ▀▄▀▄▀▄▀▄▀▄▀▄▀▄
    ▀▄▀▄▀▄▀▄▀▄▀▄▀▄

  3. #3
    NLC Dusty is an unknown quantity at this point Dusty's Avatar
    Join Date
    Oct 2000
    Posts
    2,953
    It prompts if there's more than one location in the history. If you want to override the prompt, clear the window's history.
    I think I may have been here before... a long, long time ago... 599699 Unread Posts, you say?

    Ah, I found my old avatar. The hypnotic evil duck.
    It was 2002. Duck avatars were the style at the time.
    Long and fascinating story there. I'd tell you if I remembered it.

  4. #4
    Rebutted, enshrined meow is an unknown quantity at this point meow's Avatar
    Join Date
    Feb 2001
    Location
    FP Crematory
    Posts
    8,658
    Ha! That actually worked but only in Netscape. Never noticed that before.
    (o<
    //\ &nbsp; &nbsp; &nbsp; =^..^=

  5. #5
    NLC Dusty is an unknown quantity at this point Dusty's Avatar
    Join Date
    Oct 2000
    Posts
    2,953
    Ha! That actually worked
    What, did you think I made it up?
    I think I may have been here before... a long, long time ago... 599699 Unread Posts, you say?

    Ah, I found my old avatar. The hypnotic evil duck.
    It was 2002. Duck avatars were the style at the time.
    Long and fascinating story there. I'd tell you if I remembered it.

  6. #6
    Rebutted, enshrined meow is an unknown quantity at this point meow's Avatar
    Join Date
    Feb 2001
    Location
    FP Crematory
    Posts
    8,658
    No, just surprized since I've never heard it before. The use is a little limited if it's only Netscape that handles it that way though.
    (o<
    //\ &nbsp; &nbsp; &nbsp; =^..^=

  7. #7
    NLC Blank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond repute Blank Verse's Avatar
    Join Date
    Aug 2001
    Location
    Calgary
    Posts
    13,137

    Wink

    Originally posted by Bruce
    You can't close a window with javascript unless the window was opened with javascript.

    If you try to, you'll see the message you posted. I don't know of any other work-arounds.
    Actually, this works out well, cause I'm going to have it open through javascript.
    Quote Originally Posted by PHPRalph View Post
    Greetings?!?!
    Condign got to this part and am looking saucy to chilling gone from concluded here and hainging with all

  8. #8
    Rebutted, enshrined meow is an unknown quantity at this point meow's Avatar
    Join Date
    Feb 2001
    Location
    FP Crematory
    Posts
    8,658
    Then what are you whining about?
    (o<
    //\ &nbsp; &nbsp; &nbsp; =^..^=

  9. #9
    NLC Blank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond repute Blank Verse's Avatar
    Join Date
    Aug 2001
    Location
    Calgary
    Posts
    13,137

    Wink

    well, cause when I was testing it, I was just opening it through the URL, I hadn't tried opening it yet with the code I was gonna use to open the browser.
    Quote Originally Posted by PHPRalph View Post
    Greetings?!?!
    Condign got to this part and am looking saucy to chilling gone from concluded here and hainging with all

  10. #10
    I'm on a boat anhedonia is a name known to allanhedonia is a name known to allanhedonia is a name known to allanhedonia is a name known to allanhedonia is a name known to allanhedonia is a name known to allanhedonia is a name known to all anhedonia's Avatar
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    4,047
    Originally posted by meow
    Then what are you whining about?
    He's Canadian, what do you expect?
    In all that we are losing
    Aren't we just confusing
    Youth with beauty?
    Truth with duty?

  11. #11
    Rebutted, enshrined meow is an unknown quantity at this point meow's Avatar
    Join Date
    Feb 2001
    Location
    FP Crematory
    Posts
    8,658
    Duh. Dumb.
    (o<
    //\ &nbsp; &nbsp; &nbsp; =^..^=

  12. #12
    NLC Blank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond reputeBlank Verse has a reputation beyond repute Blank Verse's Avatar
    Join Date
    Aug 2001
    Location
    Calgary
    Posts
    13,137

    Wink

    Originally posted by +chips


    He's Canadian, what do you expect?
    As soon as I finish my beer and donut, and once I turn off the hockey game, I'll comment to that, eh?
    Quote Originally Posted by PHPRalph View Post
    Greetings?!?!
    Condign got to this part and am looking saucy to chilling gone from concluded here and hainging with all

Closed Thread

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