<script type="text/javascript">
// <![CDATA[
function openWindow(url,width,height,options,name) {
width = width ? width : 800;
height = height ? height : 600;
options = options ? options : 'resizable=yes';
name = name ? name : 'openWindow';
window.open(
url,
name,
'screenX='+(screen.width-width)/2+',screenY='+(screen.height-height)/2+',width='+width+',height='+height+','+options
)
}
// ]]>
</script>
Adjust the link to the chat using the function defined above:
<a href="chat/" onclick="openWindow(this.href);this.blur();return false;">Chat</a>
To open the chat window with a different size you would use the following link:
<a href="chat/" onclick="openWindow(this.href,1024,768);this.blur();return false;">Chat</a>
// <![CDATA[
function openWindow(url,width,height,options,name) {
width = width ? width : 800;
height = height ? height : 600;
options = options ? options : 'resizable=yes';
name = name ? name : 'openWindow';
window.open(
url,
name,
'screenX='+(screen.width-width)/2+',screenY='+(screen.height-height)/2+',width='+width+',height='+height+','+options
)
}
// ]]>
</script>
Adjust the link to the chat using the function defined above:
<a href="chat/" onclick="openWindow(this.href);this.blur();return false;">Chat</a>
To open the chat window with a different size you would use the following link:
<a href="chat/" onclick="openWindow(this.href,1024,768);this.blur();return false;">Chat</a>
No comments:
Post a Comment