Jump to content

No image in IE w/ popup.php


dougc

Recommended Posts

My first post. I don't know anything about php (just some html and css). A while ago I found just enough php code to add popup windows for larger images on my website.I thought it worked fine since it worked on my Mac w/ Safari. But on IE (6, 7, and 8 I think) when a visitor clicks on a thumbnail the new window has the red X box instead of the larger image.The url is http://dougcoe.com/cornershouse.htmlThe relevant code bit is: <table id="thumbs"> <tr> <td><a href="java script:;" onmouseover="changepic('one','images/projects/curve-NE-high-med.jpg','caption','Kitchen in front with carport to far right')" "popup.php" onclick="window.open('images/projects/curve-NE-high-big.jpg','width=800,height=600');return false" target="-blank"> <img src="images/thumbs/curve-NE-high-th.jpg"></a></td> <td class="thumb1"><a href="java script:;" onmouseover="changepic('one','images/projects/curve-1stFl-med.jpg','caption','First floor plan')" "popup.php" onclick="window.open('images/projects/curve-1stFl-big.jpg','width=800,height=600');return false" target="-blank"> <img src="images/thumbs/curve-1stFl-th.jpg"></a></td> </tr> Thank you in advance for any tips, clues, or complete solutions. :) Doug

Link to comment
Share on other sites

A while ago I found just enough php code to add popup windows for larger images on my website.
Really? I'd like to see that! PHP doesn't do popup windows. That's in the Javascript field. Shifting over to that topic, your code is an example of poor Javascript, to say it bluntly. The use of inline JS, as well as inline styles, is highly discouraged. That includes all of your inline "onmouseover" events. The best practice is to use unobtrusive JS, i.e. keeping the JS within the <script> tags, and using the event handlers there. That way, the structure of your document is much clearer. BTW, using "java script:" within the "href" attribute is also highly discouraged.
Link to comment
Share on other sites

Really? I'd like to see that! PHP doesn't do popup windows. That's in the Javascript field. Shifting over to that topic, your code is an example of poor Javascript, to say it bluntly. The use of inline JS, as well as inline styles, is highly discouraged. That includes all of your inline "onmouseover" events. The best practice is to use unobtrusive JS, i.e. keeping the JS within the <script> tags, and using the event handlers there. That way, the structure of your document is much clearer. BTW, using "java script:" within the "href" attribute is also highly discouraged.
That's all well and good, but if there's a simple fix using what I've got I'm all ears. I'm not a website developer and don't really want to learn javascript just to fix this small problem. The professional website developer I paid a lot of money to put the "java script:" inside the href. What I added is just the: "popup.php" onclick="window.open('images/projects/curve-NE-high-big.jpg','width=800,height=600');return false" target="-blank"Any ideas on why this kind of image won't work in IE in this instance and what kind would work?Thank you, Doug
Link to comment
Share on other sites

Somehow this bit:"popup.php"may have gotten separated from a meaningful attribute in your tags. Right now, it's just sitting there, not connected to anything, doing nothing. Is it supposed to do something?

Link to comment
Share on other sites

Deidre's Dad--I don't know enough to know why I included that. Found this line of code on the web months ago. I've taken that bit out.Fmdpa--Good catch, I hadn't noticed it. And that's part of the website I paid good money to a pro for! I've changed it.Now I've just got to find a friend with IE and have them check it.Thanks again for all the help!Doug

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...