Link To Re-Sized Window

Post new topic   Reply to topic

View previous topic View next topic Go down

Link To Re-Sized Window

Post by Marc on Fri Oct 16, 2009 6:01 pm

This script allows you to make a window smaller or larger depending on what you set it to.

When the link is clicked, the window will stay the size you choosed.

First, add this script to your Head tags of your html page.

Code:
<script type="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
  href=mylink;
else
  href=mylink.href;
window.open(href, windowname, 'width=400,height=400,scrollbars=yes');
return false;
}
//-->
</script>


Then, use this as your link :

Code:
<a href="URL HERE" onClick="return popup(this, 'notes')">Click Here</a>


Replace URL HERE with your url.

You can also modify the size of the window by editing this in the script code :

'width=400,height=400,scrollbars=yes'

Marc
Administrator
Administrator

Posts: 321
iCoins: 643

View user profile http://www.iwebbuddy.com

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum