I want to create a link that will keep the user on the current page, but open a small pop up window (a window that won't show an adderss bar, favorites, or any sort of toolbars) that is basically just blank and will feature text. Example of this: On most vbulletin forums, when you use the 'go advanced' reply, there will be a box for smileys. If there are too many smileys, you can click 'more' and it will open up a window similar to what I am looking for, with more smileys. I don't think DP has this, but most other forums with a lot of smileys will feature this. Anyway, I have a link for a contest, and just want the link to open a small pop-up window with the rules. Thanks in advance.
You're going to have to use JavaScript for this. Unfortunately I'm not home (and have not been for several days), otherwise I'd pull the script out of my code library and give it to you.
Use this for your link: <a href='javascript:window.open("http://yoururl","contestrules", "menubar=0,resizable=0,width=350,height=350");'>link text</a> Code (markup): You should change yoururl to the url of the contest rules. contestrules can stay the same this is the window identifier. Link text should be the text you want to display for the link. Hope this helps!
That will fail if the user's browser doesn't support JavaScript or if the script gets forcibly removed by a firewall.
Wouldn't this be better? <a href="filename.html" onClick="javascript:window.open('http://yoururl.tld/filename.html','POPUP Window', 'menubar=0,resizable=0,width=350,height=350"); return false;'>link text</a> Code (markup): That way if the user has Javascript disabled, the window still opens. - JTD
@ JTD <a href="filename.html" onClick="javascript:window.open('http://yoururl.tld/filename.html','POPUP Window', 'menubar=0,resizable=0,width=350,height=350"); return false;'>link text</a> Code (markup): wouldn't that cause the filename.html to be loaded in the main browser window and the popup??
You'd have to have the default action "return false" before opening the new window. Anyway, I'm home now... and thus I'll grace you with a link: http://www.accessify.com/features/tutorials/the-perfect-popup/