I have a php script that queries a mysql db and build a form on a page for each row returned. Each form has four fields and a thumbnail of a JPEG. Below the image is a link to view the full image in a new window by using a javascript function. (No javascript jibes before I go any further, it was the only way I knew how). When I enter a query and say 10 records are returned (10 forms are created with the same name), the data and appropriate thumbnails are displayed correctly. When I click on the link the full image is only displayed for the first six links. After this clicking on the link has no effect. In the example above, the first five images were the same and the last five were also the same. I should also mention that when I load this page, I get an IE error 'unterminated string constant' but the page does load correctly. I have checked my code for closing quotes etc but they seem OK. Is there a max number of forms that can be created on a page or do I have to name them all different or is there some other explanation as to why the images won't display. Any ideas would be helpful and I can post more code if required.
The call to the function is: echo "<td width='200' colspan='2' align='center' class=labels><a href='javascript:void(0)' onclick='ViewFullImage(\"$img_code\")'>View full size</a></td>"; The function is: function ViewFullImage(strCode) { msg=window.open("","msg","height=400,width=750,left=20,top=80,scrollbars=yes ,resizable=yes"); msg.document.write("<html><title>Decoration Image</title>"); msg.document.write("<body bgcolor='white' onblur=window.close()>"); msg.document.write("<center><img src=images/" + strCode + ".jpg align=center valign=center></center>"); msg.document.write("</body></html><p>"); } **************************************************** This e-mail is intended for the recipient only and may contain confidential information. If you are not the intended recipient then you should reply to the sender and take no further ation based upon the content of the message. Internet e-mails are not necessarily secure and CCM Limited does not accept any responsibility for changes made to this message. Although checks have been made to ensure this message and any attchments are free from viruses the recipient should ensure that this is the case. **************************************************** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php