Modeless Window

This section contains a lot of Scripting material for your website.

Modeless Window

Postby MT Shahzad on March 11th, 2008, 4:55 pm

The below shows the code on how to create a modeless window in javascript.

Code: Select all
function modelesswin(url,mwidth,mheight)
{
if (document.all&&window.print) //if ie5
   eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
   eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

//configure URL and window dimensions (width/height)
modelesswin("http://www.geosourcecode.net",600,600)

//To load via link, use something like below:
<a href="javascript:modelesswin('http://geosourcecode',600,400)">Click here</a>
MT Shahzad
Web/Software Developer
http://mts.sw3solutions.com
User avatar
MT Shahzad
Site Admin
 
Posts: 300
Joined: February 29th, 2008, 8:11 am
Location: Muridke, Pakistan

Return to Java Script / VB Script

Who is online

Users browsing this forum: No registered users and 0 guests