darp Posted October 4, 2011 Posted October 4, 2011 A have a osC 2.2 store and which worked fine on all browsers until Firefox 7 came around. It is just a small annoyance but, when someone clicks "Click to enlarge" the window that pops up is tiny - about 2 cm x 4 cm. The image inside the window is full size, but the window has to be stretched to see it. It used to open to the size of the image. In popup_image.php I have the following code. Does it need to be tweaked and how would I go about doing that? <script language="javascript" type="text/javascript"><!-- var i=0; function resize() { if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) { i=23; //IE 6.x on Windows XP SP2 } else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) { i=50; //IE 6.x somewhere else } else if (window.navigator.userAgent.indexOf('MSIE 7.0') != -1) { i=0; //IE 7.x } else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) { i=38; //Firefox on Windows } else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1 && window.navigator.userAgent.indexOf("MSIE") == -1) { i=45; //Mozilla on Windows, but not IE7 } else if (window.opera && document.childNodes) { i=50; //Opera 7+ } else if (navigator.vendor == 'KDE' && window.navigator.userAgent.indexOf("Konqueror") != -1) { i=-4; //Konqueror- this works ok with small images but not so great with large ones //if you tweak it make sure i remains negative } else { i=70; //All other browsers } if (document.images[0]) { imgHeight = document.images[0].height+150-i; imgWidth = document.images[0].width+30; var height = screen.height; var width = screen.width; var leftpos = width / 2 - imgWidth / 2; var toppos = height / 2 - imgHeight / 2; window.moveTo(leftpos, toppos); window.resizeTo(imgWidth, imgHeight); } self.focus(); } //--></script> BTW, it is not just my store that has this problem with FF7, but I noticed it is a problem with all osCommerce 2.2 stores as well as Zen Cart and other variations of the Click to Enlarge link.
web-project Posted October 4, 2011 Posted October 4, 2011 much easier to replace the pop-up javascript to ajax as it will fix all issues with compatibilities between browsers. Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you.
darp Posted October 11, 2011 Author Posted October 11, 2011 Thanks for the answer. Could you/someone point me to the ajax script you describe? I have looked around, but knowing nothing about ajax and very little about javascript, I can't make out what I should be doing. Any further information would be helpful. Thanks.
web-project Posted October 12, 2011 Posted October 12, 2011 why people are so lazy, the first line of my signature contain link to contribution database!! http://addons.oscommerce.com/info/5812 http://addons.oscommerce.com/info/7313 http://addons.oscommerce.com/info/5886 Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here! 8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself. Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues. Any issues with oscommerce, I am here to help you.
darp Posted October 13, 2011 Author Posted October 13, 2011 Whats with the low life attitude? Believe me, I searched the database, downloaded dozens of useless scripts, spending hours digging through the crap and the ones that you supplied the links to are so buried, that you need to know exactly where and what they are to find them. One of them I had already discovered - it looks like garbage. And I didn't know any of these had anything to do with "ajax", so I had no idea that that is what you were talking about - and I wanted some clarification. Up until a few hours ago I didn't even know what a "lightbox" was, so I didn't think that had anything to do with what I need. It might do. Thanks.
nicola.pegorer Posted October 23, 2011 Posted October 23, 2011 A have a osC 2.2 store and which worked fine on all browsers until Firefox 7 came around. It is just a small annoyance but, when someone clicks "Click to enlarge" the window that pops up is tiny - about 2 cm x 4 cm. The image inside the window is full size, but the window has to be stretched to see it. It used to open to the size of the image. In popup_image.php I have the following code. Does it need to be tweaked and how would I go about doing that? <script language="javascript" type="text/javascript"><!-- var i=0; function resize() { if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) { i=23; //IE 6.x on Windows XP SP2 } else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) { i=50; //IE 6.x somewhere else } else if (window.navigator.userAgent.indexOf('MSIE 7.0') != -1) { i=0; //IE 7.x } else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) { i=38; //Firefox on Windows } else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1 && window.navigator.userAgent.indexOf("MSIE") == -1) { i=45; //Mozilla on Windows, but not IE7 } else if (window.opera && document.childNodes) { i=50; //Opera 7+ } else if (navigator.vendor == 'KDE' && window.navigator.userAgent.indexOf("Konqueror") != -1) { i=-4; //Konqueror- this works ok with small images but not so great with large ones //if you tweak it make sure i remains negative } else { i=70; //All other browsers } if (document.images[0]) { imgHeight = document.images[0].height+150-i; imgWidth = document.images[0].width+30; var height = screen.height; var width = screen.width; var leftpos = width / 2 - imgWidth / 2; var toppos = height / 2 - imgHeight / 2; window.moveTo(leftpos, toppos); window.resizeTo(imgWidth, imgHeight); } self.focus(); } //--></script> BTW, it is not just my store that has this problem with FF7, but I noticed it is a problem with all osCommerce 2.2 stores as well as Zen Cart and other variations of the Click to Enlarge link. Hello Dan, I have the same problem.....did you find any solution ? Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.