DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Site Building & Maintenance

Reply
 
Thread Tools Display Modes
Old 08-25-2005, 07:38 AM   #1
John Woram
Member
 
Join Date: Aug 2005
Posts: 28
Default body onblur() alternative?

I've been using <body onblur="self.focus()"> when I open a small pop-up window, to prevent that window from disappearing if the user accidentally clicks outside its boundaries. This is against strict XHTML standards, but it does work in IE and FF on a PC, but not in Mac/Safari.
So, does anyone know of a standards-compliant way to force a pop-up window to retain focus until the user closes it?

Thanks,
John Woram
John Woram is offline   Reply With Quote
Old 10-18-2005, 09:01 AM   #2
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

Quote:
Originally Posted by John Woram
I've been using <body onblur="self.focus()"> when I open a small pop-up window, to prevent that window from disappearing if the user accidentally clicks outside its boundaries. This is against strict XHTML standards, but it does work in IE and FF on a PC, but not in Mac/Safari.
So, does anyone know of a standards-compliant way to force a pop-up window to retain focus until the user closes it?
I saw the answer to this today. Not the best way to go about it but instead of using onblur in in the body tag, make the whole page into a form and apply onblur to that! I think I'd leave it as it stands. It may be "bad" programming, but turning a whole page into a form is not semantic markup....

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Old 10-18-2005, 09:18 AM   #3
John Woram
Member
 
Join Date: Aug 2005
Posts: 28
Default

Thanks Kelvyn, and I agree with you that I'd leave it as is. And I can't help wondering why body onblur() is against standards--especially since there doesn't seem to be an acceptable alternative.
John Woram is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there an alternative to InDesign? Michael Rowley Print Design 35 08-31-2005 11:49 AM


All times are GMT -8. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.