use Smifflas method but add an onclick="popUp("lol.htm");" to your button instead of the <a href> bit.
Printable View
use Smifflas method but add an onclick="popUp("lol.htm");" to your button instead of the <a href> bit.
Add onclick="popUp("lol.htm");"
to the end of your button, E.G: <button script="somethingjustusingthistofillspaceetc" onclick="popUp("lol.htm");">
Or use
<a href="lol.html" onclick="popUp('lol.htm') return false;">Button Code</a>
heres an easier way
<a href="#" onClick="chw=window.open('file.html','NewWindow',' resizable=no,scrollbars=yes,status=no,width=900,he ight=440'); if (chw != null) chw.focus(); return false"> BUTTON </a>
If you dont wish it to scroll just change scrollbars to no :)
hm i can never remember window.open javascript parameters tbh
EDIT:
In head:
For your buttonCode:<script language="JavaScript">
function popUpWindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=900,height=440');");
}
</script>
Try that :)Code:<input type="button" value="Button Text" onclick="popUp("lol.html");" />
<a href="#" onClick="chw=window.open('file.html','NewWindow',' resizable=no,scrollbars=yes,status=no,width=900,he ight=440'); if (chw != null) chw.focus(); return false"> <img src="linktobuttonimage" border="0" /> </a>
Mine or what craig said above do basically the same thing
Yeah, only diff is i use an actual button as opposed to a button image..