PDA

View Full Version : Crawler.js Vs Simplegallery.js



HotelsInColombia
08-16-2012, 12:23 PM
Hi there, Iím using the crawler to scroll images and on the same page I have the simplegallery also. On GC there is no problem but on IE it seems to be that there is conflict between booth options, and the simplegallery just go black and does not show the pictures while the scroller keeps on working without problem, anyone knows what can I do to make them work properly together on IE? www.hotelsincolombia.net

jscheuer1
08-16-2012, 03:53 PM
Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Warning: Please include a link to the DD script(s) in question in your post. See this post (http://www.dynamicdrive.com/forums/showpost.php?p=7) for more information.

You have a strange situation because the page is in Quirks Mode. You could put it in Standards Mode and that would solve the script conflict, but it would also change the rendering of the page.

The crawler script does certain things if an IE browser is in Quirks Mode. These were designed to help it to work in older IE versions. And it works, but it also appears to cause the conflict.

The simple gallery script says that it requires Standards Mode, but apparently it's working on that page in Quirks Mode as long as crawler isn't present.

This seems to work - add the following as shown to the head of the page:


<HTML>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<HEAD><TITLE>HotelsInColombia | Book online your hotel in Colombia - 'Best prices, No Booking Fees, Special Offers, Secure Reservations, Pay Direct At The Hotel'</TITLE>
<META name=keywords content="hotels Colombia, hotel Colombia, hotels Columbia, hotels in Colombia, hotel reservations Colombia, booking Colombia, reservations Colombia, cheap hotels Colombia, discount hotels Colombia, bed and breakfast Colombia, Colombia resorts, best hotel prices Colombia ">
<META name=descr . . .


Then, using a text only editor like NotePad, open up the crawler.js file. Where (and I see you've tried editing this already) you have:


/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie = true;
try{document.documentMode = 2000}catch(e){};
iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (\d+\.\d+).*$/, '$1'));
if(iever < 6)
oldie = 0;
if(iever < 5.5){
Array.prototype.push = function(el){this[this.length] = el;};
ie5 = true;
dash = /(-(.))/;
String.prototype.encamel = function(s, m){
s = this;
while((m = dash.exec(s)))
s = s.replace(m[1], m[2].toUpperCase());
return s;
};
}
@end @*/

Make that:


/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie = true;
try{document.documentMode = 2000}catch(e){};
iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (\d+\.\d+).*$/, '$1'));
if(iever < 6)
oldie = 1;
if(iever < 5.5 && ![].push){
Array.prototype.push = function(el){this[this.length] = el;};
ie5 = true;
dash = /(-(.))/;
String.prototype.encamel = function(s, m){
s = this;
while((m = dash.exec(s)))
s = s.replace(m[1], m[2].toUpperCase());
return s;
};
}
@end @*/

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you're still having problems, make it:


/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie = true;
try{document.documentMode = 2000}catch(e){};
iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (\d+\.\d+).*$/, '$1'));
if(iever < 6)
oldie = 0;
@end @*/

Again, the browser cache may need to be cleared and/or the page refreshed to see changes.

Or you could always revert to the original:


/*@cc_on @*/
/*@if(@_jscript_version >= 5)
ie = true;
try{document.documentMode = 2000}catch(e){};
iever = Math.min(document.documentMode, navigator.appVersion.replace(/^.*MSIE (\d+\.\d+).*$/, '$1'));
if(iever < 6)
oldie = 1;
if(iever < 5.5){
Array.prototype.push = function(el){this[this.length] = el;};
ie5 = true;
dash = /(-(.))/;
String.prototype.encamel = function(s, m){
s = this;
while((m = dash.exec(s)))
s = s.replace(m[1], m[2].toUpperCase());
return s;
};
}
@end @*/

And put a standards invoking DOCTYPE on the page:


<!DOCTYPE html>
<HTML>
<HEAD><TITLE>HotelsInColombia | Book online your hotel in Colombia - 'Best prices, No Booking Fees, Special Offers, Secure Reservations, Pay Direct At The Hotel'</TITLE>
<META name=keywords content="hotels Colombia, hotel Colombia, hotels Columbia, hotels in Colombia, hotel reservations Colombia, booking Colombia, reservations Colombia, cheap hotels Colombia, discount hotels Colombia, bed and breakfast Colombia, Colombia resorts, best hotel prices Colombia ">
<META name=descr . . .

Then there would be no script problem, but as I say, the page will render differently. The markup and/or styles would need to be adjusted.

Again, the browser cache may need to be cleared and/or the page refreshed to see changes.

HotelsInColombia
08-20-2012, 11:15 PM
Thank you so much for your help, with the first option is working perfect on IE and GC. I tried to attach the <!DOCTYPE html> but it is giving me a hard time to get the picture on the right position. I really don’t know nothing about building websites and what you saw I did it alone, so one more time thank you for all your help… the guys that build where building my previous website disappear so I needed to start all over again…