![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I have designed some pages for my freelance writer / photographer friend, whereby I click on a menu item and clips of her articles appear in a new window (using target "_blank"). What I want to be able to achieve is that when someone has read the article, then they can click a hyperlink or button, which will close the window down. I know that it can be easily achieved by just clicking on the x botton in the top right hand corner of the window, but I'd like to know if I can do this and encorporate it into the website. Thanks Stuart Cheers Stuart |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Thanks -D-, Sorry, I am have no experience with Javascript. Do I add the function in my CSS external file? |
#5
| |||
| |||
|
|
I have designed some pages for my freelance writer / photographer friend, whereby I click on a menu item and clips of her articles appear in a new window (using target "_blank"). |
|
What I want to be able to achieve is that when someone has read the article, then they can click a hyperlink or button, which will close the window down. |
|
I know that it can be easily achieved by just clicking on the x botton in the top right hand corner of the window, but I'd like to know if I can do this and encorporate it into the website. |
#6
| |||
| |||
|
|
GUI controls can never be replaced with something equally reliable. While you can close a window with JS, it will cause problems or confuse the visitor now and then. If JS is not available the link won't work at all ... |
#7
| |||
| |||
|
|
script type="text/javascript" document.write('<a href="javascript:window.close();">Close</a>'); /script |

#8
| |||
| |||
|
Better. ![]() But I still consider it rather useless ... at least the above doesn't cause usability issues. |
#9
| |||
| |||
|
|
On Sun, 13 Nov 2005 14:50:11 +0100, Michael Fesser <netizen (AT) gmx (DOT) de wrote: Better. ![]() But I still consider it rather useless ... at least the above doesn't cause usability issues. Exactly. Gary |
#10
| |||
| |||
|
|
How about this - noscript script type="text/javascript">document.write("You need to enable js to see this stuff")</script /noscript |
![]() |
| Thread Tools | |
| Display Modes | |
| |