Click to See Complete Forum and Search --> : Window Opening Function


kin0k0
08-22-2004, 03:41 PM
I've been trying to make a custom function to make it easier to open pop-up windows, so that all you would need to do is something like this:
<a href="javascript:openWindow(url,width,height)">Click here to blah</a>
But when I try to make the function, the quotes prevent me from using variables. Can someone help me?

David Harrison
08-22-2004, 04:20 PM
Using a function for pop-up windows won't work for pop-up blockers. If you want a nice easy way to do it, then just do this:<a href="somepage.html" onclick="window.open(this.href,'','width=400,height=300');return false;">Go to somepage!</a>