[Javascript] Popup script and arguments
Guillaume
javascript at webdesignofficina.com
Thu Aug 10 09:46:40 CDT 2006
Hi list,
Searching for a decent popup script I came across one on PPK site (
http://www.quirksmode.org/js/popup.html )
Here's a paste below:
<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}
// -->
</script>
This line below goes inline to call the script from a link
<a href="popupex.html" onclick="return popitup('popupex.html')"
>Link to popup</a>
My question is: How to have the width and height arguments not managed
in the script, but inline, such as:
<a href="popupex.html" onclick="return popitup('popupex.html','height=200,width=150')"
>Link to popup</a>
Do I have to change something in the script to do that ?
Thank you for any help...
Guillaume.
More information about the Javascript
mailing list