Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Probably a stupid/nobrainer question:

    I had look at Transio's homepage. His popUp photo's are closable just by clicking anywhere inside the picture itself. On my own popUps I've added a "close" button as I thought you needed som defined object (the button) to perform the close() function, obviously I was wrong.

    How can I embed that function in my code (with the informative "alt" text) telling you to "click anywhere to close this window"?

    An additional question (might be as stupid/simple as the above):
    Are there anyway you can view the source code ("view source") in a popUp window that lacks the toolbar?
    S. Rosland

  2.  

  3. #2
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    This is the code Transio used:
    Code:
    <img id="photo" name="photo" src="image.jpg"
    alt="Click to close window" border="0"
    style="cursor:hand" onclick="window.close()">
    To view the source of that page, right mouse click on the edge of the window, when the cursor is not a hand. "View Source" is half way down the context menu.

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Spluf, you ripped my code!!! I'm gonna sue!!!

    EDIT: j/k for those who don't know :-P

  5. #4
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    Technically, I just provided the means for Rosland to rip code. I'm an accessory to the rip. :ichatangel:

  6. #5
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Many thanx from Rosland the ripper :devious:
    S. Rosland

  7. #6
    Senior Member nocloset's Avatar
    Join Date
    Sep 2003
    Posts
    108
    Member #
    3228
    It is possible for the designer of a web page to turn off the context menu that you get by right-clicking, so the handy-dandy tip might not work when you are viewing some pages.

  8. #7
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    <body oncontextmenu="return false">

    You can get that script from my home page, too ;-)

    Still can't prevent someone from viewing the source, though.

  9. #8
    Senior Member ericbusch's Avatar
    Join Date
    Aug 2003
    Location
    Daejeon, South Korea
    Posts
    241
    Member #
    2779
    I also have a question concerning closing windows. Say you are looking at the wonderful photos on transio's homepage by clicking on the thumbs and viewing the images in new windows. But, let's say your computer is super fast and you were never able to read the alt message "Click to close window".

    My question is, is it possible for that window to be closed automatically when the user brings the thumbnail ("main") page back into focus? I have seen a site do this before but I can't remember where.

    Any ideas?
    eric
    Blogs For Sale - Each blog is packed with 1000s of signatures and ads are highly integrated into the site. Great CTR! Completely customizable from Admin CP. On Sale!
    Complete Websites For Sale - Fantastic looking sites rich with content. Come complete with domain names. I only have a couple of these.

  10. #9
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    The page isn't designed so people read the alt text. There's a tool tip that says "click to close" if you keep your mouse still over the photo.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com