Hi,
I am trying to get a button to open a new window that will display a PDF File for customers to download. I can make the window open, and I can get it the right size. But within the cmomand
window.open(url,name,functions)
I cannot make the name part work, and always get the hyperlink address shown at the top of the screen, whereas I want to put a title there. If I actually put a name within the "" or '', I get syntax errors or illegal calls.
Attached below is the source for the page. If anyone can tell me what I'm doing wrong it would be appreciated. Also can anybody tell me how to determine what screen resolution somebody is using, as my site requires 1024x768 to work properly.
-- Code --
<html>
<head>
<meta name="generator" content="GoLive CyberStudio 3">
<title>bottom navigation page - general</title>
<script language="JAVASCRIPT" cyberversion="N1.2"><!--
// This script copyright 1997, Tom Negrino and Dori Smith.
// This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed."
// For more information, see < // This script may be used and modified, but the copyright notice must remain intact.
if (document.images) {
img1on = new Image
img1off = new Image
img2on = new Image
img2off = new Image
img1on.src = "cmainmenu_hlt.gif"
img1off.src = "cmainmenu.gif"
img2on.src = "corp_fact_hlt.gif"
img2off.src = "corp_fact.gif"
}
else {
img1on = ""
img1off = ""
img2on = ""
img2off = ""
}
// This script was adapted from one of Nick Heinle's scripts from
// his book "Designing with Javascript"
function changePages(bot_frameURL,top_frameURL,infoURL,picURL) {
parent.navigator_bot_frame.location.href = bot_frameURL;
parent.navigator_top_frame.location.href = top_frameURL;
parent.info_frame.location.href = infoURL;
parent.picture_frame.location.href = picURL;
}
function openNewWindow(url) {
window.open(url,"",'width=800,height=600,menubar=yes');
}
window.onError=null;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_mac = (agt.indexOf("mac"
!=-1);
// -->
</script>
</head>
<body background="cdivide.gif">
<TABLE VALIGN="TOP" CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH=100% HEIGHT="100%">
<TR>
<TD VALIGN="TOP" WIDTH="100">
<!--1st cell of outside table -->
<table border="0" cellpadding="0" cellspacing="0" WIDTH="100%" height="100%">
<TR ALIGN="CENTER" HEIGHT="100%">
<TD ALIGN="TOP" ALIGN="CENTER" width="338" height="100%" valign="top"><img src="c_nav_bot_text.gif" width="226" height="25" border="0" name="home"></a></td>
</TR>
</TABLE>
</TD>
<CENTER>
<!--nested table in 2nd cell -->
<td ALIGN="RIGHT" width="100%" valign="TOP">
<table border="0" cellpadding="0" cellspacing="0" height="100%">
<TR ALIGN="CENTER" HEIGHT="100%">
<td align="center" width="90" height="100%"><a href="javascript
penNewWindow('factsheet.pdf')" onmouseover="document.pdf.src=img2on.src, window.status='Home';return true" onmouseout="document.pdf.src=img2off.src"><img src="corp_fact.gif" width="85" height="25" border="0" alt="Printable Factsheet" name="pdf"></a></td>
<td align="center" width="85" height="100%"><a href="javascript:changePages('nav_bot_gen.html','nav_top_empty.html','info_gen.html','pic_show_rookery.html')" onmouseover="document.gohome.src=img1on.src, window.status='Home';return true" onmouseout="document.gohome.src=img1off.src"><img src="cmainmenu.gif" width="85" height="25" border="0" alt="Back to Welcome page" name="gohome"></a></td>
</TR>
</TABLE>
</CENTER>
</TD>
</TR>
</TABLE
</body>
</html>
I am trying to get a button to open a new window that will display a PDF File for customers to download. I can make the window open, and I can get it the right size. But within the cmomand
window.open(url,name,functions)
I cannot make the name part work, and always get the hyperlink address shown at the top of the screen, whereas I want to put a title there. If I actually put a name within the "" or '', I get syntax errors or illegal calls.
Attached below is the source for the page. If anyone can tell me what I'm doing wrong it would be appreciated. Also can anybody tell me how to determine what screen resolution somebody is using, as my site requires 1024x768 to work properly.
-- Code --
<html>
<head>
<meta name="generator" content="GoLive CyberStudio 3">
<title>bottom navigation page - general</title>
<script language="JAVASCRIPT" cyberversion="N1.2"><!--
// This script copyright 1997, Tom Negrino and Dori Smith.
// This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed."
// For more information, see < // This script may be used and modified, but the copyright notice must remain intact.
if (document.images) {
img1on = new Image
img1off = new Image
img2on = new Image
img2off = new Image
img1on.src = "cmainmenu_hlt.gif"
img1off.src = "cmainmenu.gif"
img2on.src = "corp_fact_hlt.gif"
img2off.src = "corp_fact.gif"
}
else {
img1on = ""
img1off = ""
img2on = ""
img2off = ""
}
// This script was adapted from one of Nick Heinle's scripts from
// his book "Designing with Javascript"
function changePages(bot_frameURL,top_frameURL,infoURL,picURL) {
parent.navigator_bot_frame.location.href = bot_frameURL;
parent.navigator_top_frame.location.href = top_frameURL;
parent.info_frame.location.href = infoURL;
parent.picture_frame.location.href = picURL;
}
function openNewWindow(url) {
window.open(url,"",'width=800,height=600,menubar=yes');
}
window.onError=null;
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_mac = (agt.indexOf("mac"
// -->
</script>
</head>
<body background="cdivide.gif">
<TABLE VALIGN="TOP" CELLPADDING="0" CELLSPACING="0" BORDER="0" WIDTH=100% HEIGHT="100%">
<TR>
<TD VALIGN="TOP" WIDTH="100">
<!--1st cell of outside table -->
<table border="0" cellpadding="0" cellspacing="0" WIDTH="100%" height="100%">
<TR ALIGN="CENTER" HEIGHT="100%">
<TD ALIGN="TOP" ALIGN="CENTER" width="338" height="100%" valign="top"><img src="c_nav_bot_text.gif" width="226" height="25" border="0" name="home"></a></td>
</TR>
</TABLE>
</TD>
<CENTER>
<!--nested table in 2nd cell -->
<td ALIGN="RIGHT" width="100%" valign="TOP">
<table border="0" cellpadding="0" cellspacing="0" height="100%">
<TR ALIGN="CENTER" HEIGHT="100%">
<td align="center" width="90" height="100%"><a href="javascript
<td align="center" width="85" height="100%"><a href="javascript:changePages('nav_bot_gen.html','nav_top_empty.html','info_gen.html','pic_show_rookery.html')" onmouseover="document.gohome.src=img1on.src, window.status='Home';return true" onmouseout="document.gohome.src=img1off.src"><img src="cmainmenu.gif" width="85" height="25" border="0" alt="Back to Welcome page" name="gohome"></a></td>
</TR>
</TABLE>
</CENTER>
</TD>
</TR>
</TABLE
</body>
</html>