window.oprn problem

admin

Administrator
Staff member
Hi,

I have to open a new window on a href by calling a
javascript method and set the new window title based on it.

the title needs to be "download book" instead of download book, also the name of the window needs to be the same.

the below code works only if i pass "downloadbook" instead of
"download book" to the jsview "name" parameter.

In all, i need to set the name of the window as "download book" and set the new window's title also the same.


Here is the sample code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script>
// This is Function is Used to Display the New window with proper settings.
function jsView(sUrl, sName, sTitle, bBrowserBars, iHeight, iWidth)
{
if (bBrowserBars == false)
{
var sOptions = "scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=no,left=10,width=" + iWidth + ",height=" + iHeight + ",title=" + sTitle;
}
else
{
var sOptions = "scrollbars=yes,resizable=yes,menubar=yes,toolbar=yes,location=no,left=10,width=" + iWidth + ",height=" + iHeight + ",title=" + sTitle;
}
window.open(sUrl,sName,sOptions);
}
</script>
</head>
<body>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:jsView('zip.asp?id=1234','Download Book','Download Book',true,'300','400')" title="download book" class="udrlinesmall">Download book</a>
</body>
</html>
 
Back
Top