J
JoeM
I noticed with users with popup blockers, like the one in windows XP sp2
have problems with the code below.
When a user clicks on the link the popup blocker blocks the window from
opening. In XP SP2, the popup block is set to medium. Any suggestions, or
modifications to code will be appreciated.
<Start HTML CODE>
<SCRIPT language=JavaScript1.2 src="javascript.js"></SCRIPT>
<a href="imagename.JPG" onClick="image('Title', 'image location', 'width',
'height', 'window name');return false">
<End HTML CODE>
<Start js file code>
function image(title, path, width, height, windowname,scrollbars)
{
text = "<head><META HTTP-EQUIV='Pragma' CONTENT='no-cache'></head>\n"
text += "<html>\n<head>\n<title>" + title + "</title>\n";
text += "<Body leftMargin=0 topMargin=0>\n";
text += "<center>\n";
text += "<Body bgcolor=BLACK>\n";
text += "<img border='0' src='" + path + "' alt='" + title + " '></A>\n";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text, '+ width + ',' + height + ',' + '"' +
windowname + '","' + scrollbars + '" )', 0);
}
function windowProp(text, width, height, windowname,scrollbars)
{
newWindow = window.open('', windowname
,'scrollbars='+scrollbars+',width='+width+',height=' +height
+',left=0,top=0');
newWindow.document.write(text);
}
<End js file code>
have problems with the code below.
When a user clicks on the link the popup blocker blocks the window from
opening. In XP SP2, the popup block is set to medium. Any suggestions, or
modifications to code will be appreciated.
<Start HTML CODE>
<SCRIPT language=JavaScript1.2 src="javascript.js"></SCRIPT>
<a href="imagename.JPG" onClick="image('Title', 'image location', 'width',
'height', 'window name');return false">
<End HTML CODE>
<Start js file code>
function image(title, path, width, height, windowname,scrollbars)
{
text = "<head><META HTTP-EQUIV='Pragma' CONTENT='no-cache'></head>\n"
text += "<html>\n<head>\n<title>" + title + "</title>\n";
text += "<Body leftMargin=0 topMargin=0>\n";
text += "<center>\n";
text += "<Body bgcolor=BLACK>\n";
text += "<img border='0' src='" + path + "' alt='" + title + " '></A>\n";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text, '+ width + ',' + height + ',' + '"' +
windowname + '","' + scrollbars + '" )', 0);
}
function windowProp(text, width, height, windowname,scrollbars)
{
newWindow = window.open('', windowname
,'scrollbars='+scrollbars+',width='+width+',height=' +height
+',left=0,top=0');
newWindow.document.write(text);
}
<End js file code>