Pop Up Windows
Page 3
What values should I set for the pop-up window?
If you're wanting a simple pop-up window with a small amount of graphic or text, it is generally okay to set the toolbar, status bar, location bar and menubar to 0 (false). However, I find it always advisable to set the scrolling and resizable values to 1 (true) unless you are ONLY calling a graphic. The reason is that many people have their font sizes set at a larger size than you may be using, and if they can't resize the window or scoll down it to see all the text, you've got a pretty usless window. Never assume that everyone browses at the same settings you do!
Is this script fully accessible for people not using a mouse?
No. You can easily make it so, however, by changing the code to read like this:
<a href="javascript:void(0)" onclick="window.open('shakespearian.html', 'info','toolbar=0,resizable=1,width=440,height=350'); return false;" onkeypress="window.open('shakespearian.html', 'info','toolbar=0,location=0,resizable=1,width=440,height=350'); return false;">this link</a>
This code adds the "onkeypress" command as well as the "onclick" and ensures everyone using just keyboard can also open the window.
What does that "return false" thing do, then?
That makes sure that people who don't have javascript enabled in their browsers will still be able to access this function.
Can I use this code as you've written it here without crediting you?
Yes, of course you can. This is a very simple code and it is not copyrighted.
Have fun popping!
[Back] :: [Top]
|