Results 1 to 3 of 3

Thread: Crawler.js Vs Simplegallery.js

  1. #1
    Join Date
    Aug 2012
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Crawler.js Vs Simplegallery.js

    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
    Last edited by jscheuer1; 08-16-2012 at 02:16 PM. Reason: Format

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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 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:

    Code:
    <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:

    Code:
     /*@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:

    Code:
     /*@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:

    Code:
     /*@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:

    Code:
     /*@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:

    Code:
    <!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.
    Last edited by jscheuer1; 08-17-2012 at 05:21 AM. Reason: better solution
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    HotelsInColombia (08-20-2012)

  4. #3
    Join Date
    Aug 2012
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    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…

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •