BaconBeast321 Posted August 11, 2006 Share Posted August 11, 2006 Hi there, I have a page that when you click on a picture in firefox it opens a new window and displays the picture, but when you do it in IEit opens the window but no picture.. you can view the page here...http://www.autramping.unigroups.co.nz/viewadj.php?jc=Tarantula%20Nebula-Heres the script im using<SCRIPT LANGUAGE="JavaScript">function openpic1() {OpenWindow=window.open("", "newwin", "height=600, width=800,toolbar=no,scrollbars="+scroll+",menubar=no");OpenWindow.document.write("<BODY BGCOLOR=black leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>")OpenWindow.document.write("<IMG SRC='upload/<?php echo("$jc"); echo '1.jpg' ?>' height=x'>")OpenWindow.document.write("</BODY>")OpenWindow.document.write("</HTML>")OpenWindow.document.close()self.name="main" }</SCRIPT><?phpif($oneisthere > "0") {echo '<td class=mid align=left><img src="upload/';echo("$jc");echo '1.jpg" onClick="openpic1();" width="120" height="90"></td>';}?>The view source through IE looks like this:<BODY BGCOLOR=black leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0><IMG SRC='upload/Tarantula Nebula1.jpg' height=x'></BODY></HTML>It looks like maybe it needs " instead of ' around the image name but if I try to add that in the script I get a php error Link to comment https://forums.phpfreaks.com/topic/17214-firefox-ie-weird-discrepency/ Share on other sites More sharing options...
corbin Posted August 11, 2006 Share Posted August 11, 2006 [code=php:0]<SCRIPT LANGUAGE="JavaScript">function openpic1() {OpenWindow=window.open("", "newwin", "height=600, width=800,toolbar=no,scrollbars="+scroll+",menubar=no");OpenWindow.document.write("<BODY BGCOLOR=black leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>")OpenWindow.document.write("<IMG SRC=\"upload/<?php echo("$jc"); echo "1.jpg"; ?>\" height=\"PUT AN ACTUAL HEIGHT HERE OR JUST DELETE THIS HEIGHT TAG\">")OpenWindow.document.write("</BODY>")OpenWindow.document.write("</HTML>")OpenWindow.document.close()self.name="main" }</SCRIPT><?phpif($oneisthere > 0) {echo "<td class=\"mid\" align=\"left\"><img src=\"upload/";echo $jc . "1.jpg" onClick=\"openpic1();\" width=\"120\" height=\"90\"></td>";}?>[/code]Try that and see if it works any better Link to comment https://forums.phpfreaks.com/topic/17214-firefox-ie-weird-discrepency/#findComment-72930 Share on other sites More sharing options...
BaconBeast321 Posted August 12, 2006 Author Share Posted August 12, 2006 woah thanks alot it worked a treat Link to comment https://forums.phpfreaks.com/topic/17214-firefox-ie-weird-discrepency/#findComment-73506 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.