Can anyone here recommend a method for building a popup page? Do I need to use JS for this?
I found this popup window generator, but I wonder if there is a better method.
http://javascriptkit.com/popwin/index.shtml
Also, I noticed that the above link does not have a close window button for its popup window . . .
Thanks!
building a popup window?
This is a simple one I have used and modified, although I'm sure there are better methods, tend not to think they're a great idea or use them myself it's a user decision.
I would not use the one you linked to, it doesn't degrade gracefully.
<script type="text/javascript"> <!-- function n_window(theurl) { // set the width and height var the_width=335; var the_height=355; // set window position var from_top=170; var from_left=460; // set other attributes var has_toolbar='no'; var has_location='no'; var has_directories='no'; var has_status='no'; var has_menubar='no'; var has_scrollbars='no'; var is_resizable='no'; // attributes put together var the_atts='width='+the_width+',height='+the_height+',top='+from_top+',screenY='+from_top+',left='+from_left+',screenX='+from_left; the_atts+=',toolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status='+has_status; the_atts+=',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizable='+is_resizable; // open window window.open(theurl,'',the_atts); } //--> </script> ======================= Link: <a href="page.htm" onclick="n_window('page.htm'); return false" onfocus="this.blur()">text link</a> ======================= Close window button: <form action="none"> <div> <input type="button" value="Close Window" onclick="self.close()" /> </div> </form>
building a popup window?
building a popup window?
Nate I would read through the second link that firstreflex provided it's more up to date using the DOM.
Hugo.
building a popup window?
This is a simple one I have used and modified, although I'm sure there are better methods, tend not to think they're a great idea or use them myself it's a user decision.
Nate I would read through the second link that firstreflex provided it's more up to date using the DOM.
I agree with you Hugo, I'm not a big fan of the popup. In this case it is being used to display an excerpt from a book, similar to amazon.com. Since the user will already be on the $product page, they don't want user to go back.
I just finished implementing the first script . . . now I am off to implement firstreflex's link.
Thanks a lot for the recommendations!
Nate
building a popup window?
I have one question about firstreflex's popup link.
http://icant.co.uk/forreview/popstuff/popstuff.html
You can see it in action here:
http://icant.co.uk/forreview/popstuff/popmother.html
The popup has a "Close window" link at the top. Is there a way position that link, and make it an image instead of text?
building a popup window?
I thought using target="_blank" didn't validate?
building a popup window?
I thought using target="_blank" didn't validate?
Not with a strict doctype . . . except there is a "workaround."
http://www.zeldman.com/daily/0503a.shtml#strictlyspeaking
building a popup window?
:? Doesn't sound like a very suitable workaround. Seems like it would cause more problems than it solves.
building a popup window?
Yeah, I am comfortable using a transitional doctype.
Validation message: "This Page Is Valid -//golem.ph.utexas.edu//DTD XHTML 1.1 plus Target 1.0//EN!
The document located at <http://golem.ph.utexas.edu/~distler/blog/files/zeldman.html> was checked and found to be valid -//golem.ph.utexas.edu//DTD XHTML 1.1 plus Target 1.0//EN. This means that the resource in question identified itself as "-//golem.ph.utexas.edu//DTD XHTML 1.1 plus Target 1.0//EN" and that we successfully performed a formal validation using an SGML or XML Parser (depending on the markup language used)."
Also, I've read a few posts about xhtml 1.1 causing some headaches . . .