Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet explorer and javascript!?

    I am building a website for a client and I have come across an issue with internet explorer, the site works fine in Opera, chrome, safari, firefox etc... but when the page loads in internet explorer the main content page disappears it will reappear when you click a link (although some pages do not load correctly) Could any one have a look? Let me know if it is something obvious?

    URL alanis50.com password: ALAN (in capitals)

    Can anyone one see anything that catches their eye?

    Code:
    <script type="text/javascript">
    
    <?php $multicheck_auto = of_get_option("autoload"); ?>
    
    if (window.location.href.indexOf("#") < 0) {
        <?php 
        if ($multicheck_auto['homepage_auto'] == "1") { echo "var appearOnLoad = 1; // show home page content is ON";} 
        else if ($multicheck_auto['homepage_auto'] == "0") { echo "var appearOnLoad = 0; //  show home page content is OFF";}
        ?>                  
    }
    else if (window.location.href.indexOf("#") >= 0) {
        <?php 
        if ($multicheck_auto['otherpage_auto'] == "1") {echo "var appearOnLoad = 1; // we're not on the home page, show content is ON";} 
        else if ($multicheck_auto['otherpage_auto'] == "0") { echo "var appearOnLoad = 0; // we're not on the home page, show content is OFF";}
        ?>                  
    }
    <?php if (!($multicheck_auto['homepage_auto']) && !($multicheck_auto['otherpage_auto'])) {echo "else { var appearOnLoad = 0; } // no option checked, hiding content by default";} ?>
    
    
    var scrollToTop = 1                     //if content should scroll back to top  0/1 - on/off
    var scrollSpeed = 'slow'                //scroll speed - possible values 'slow', 'normal', 'fast', or in millisecionds xxxx
    var ss_raster =  <?php echo of_get_option("image_overlay"); ?>                      //raster image 0/1 - on/off
    var ss_interval = <?php echo of_get_option("slider_interval"); ?>                   // Length between transitions
    var ss_transitionType = <?php echo of_get_option("slider_transition"); ?>               // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
    var ss_transitionSpeed = <?php echo of_get_option("slider_speed"); ?>           // Speed of transition
    var ss_largeCaption = <?php echo of_get_option("slider_caption"); ?>                // Maker large caption appear or not 0/1 - on/off
    var ss_pauseContentOpen = <?php echo of_get_option("slider_pause"); ?>            // Pause slideshow when content opens
    var tweetUsers = ['<?php echo of_get_option("twitter_un"); ?>'];            // Your twitter account username.
    var noTweets ="3"                       //Number of tweets to load
    var TweetsDisp = 3                      //Number of tweets to display at a time, possible values 1,2, or 3. 
    var folio_items_per_page =  1           //Number of folio pages visible at once
    var folio_start_page = 0                //What page to load by default
    var lightboxTransition = 'elastic'      //Set lightbox transition type
    var overlayOpacity =0.8                 //Fancybox overlay opacity
    var overlayColor = '#000'               //Fancybox overlay color    
    var videoWidth = 750                    //Fancybox video width
    var videoHeight = 500                   //Fancybox video height
    var blog_items_per_page =  1            //Number of blog pages visible at once
    var hoverFadeSpeed = '<?php echo of_get_option("fade"); ?>'             //Portfolio/icons hover speed - Possible values: 'slow', 'normal', 'fast', or in milliseconds
    var pageFadeSpeed = <?php echo of_get_option("page_fade"); ?>                   //Page fade speed
    var sideBarToggleSpeed = <?php echo of_get_option("sidebar_speed"); ?>          //Sidebar toggle speed
    var menuEase = 'easeInCubic'            //Ease type
    var contentToggleSpeed = <?php echo of_get_option("content_speed"); ?>          //Content toggle speed
    var pageEase = 'easeInCubic'            //Ease type
    var formError="<?php _e("There was an error sending your email. Please try again.","studio"); ?>";
    var formWarning ="<?php _e("Verify fields, and try again!","studio"); ?>";
    var formSuccess ="<?php _e("Thanks, we got your mail and will get back to you in 48h!","studio"); ?>";
    var formSuccessTitle ="<?php _e("Message sent","studio"); ?>";
    var formReload ="<?php _e("Send us a mail and we will get back to you in 48 hours.","studio"); ?>";
    var formReloadTitle = "<?php _e("Contact Form","studio"); ?>";
    var base = '<?php echo home_url(); ?>'
    var ajax_url = '<?php echo admin_url("admin-ajax.php"); ?>';
    var is_post = false;
    var is_first = true;
    var fp_url = '<?php echo get_template_directory_uri() ?>';
    var closeButTitle = '<?php _e("close", "studio") ?>';
    var iePresent = false;  
    var loaderStatus = false;   
    
        function getInternetExplorerVersion() {
    
            var rv = -1; // Return value assumes failure.
    
            if (navigator.appName == 'Microsoft Internet Explorer') {
    
                var ua = navigator.userAgent;
    
                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    
                if (re.exec(ua) != null)
    
                    rv = parseFloat(RegExp.$1);
    
            }
    
            return rv;
    
        }
    
    
        function checkVersion() {
    
            var ver = getInternetExplorerVersion();
    
            if (ver == -1) return;
    
            if (ver <= 8.0) {
    
                iePresent = true;
    
            }
    
    
    
        }
    
        checkVersion();
    
    </script>

  • #2
    New Coder
    Join Date
    Oct 2008
    Posts
    41
    Thanks
    5
    Thanked 2 Times in 2 Posts

    Internet Explorer

    Just read the code and load up in IE and works perfectly.

  • #3
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    IDs cannot contain spaces.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #4
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am still having trouble with this! Which ID's are containing spaces? Would this effect IE only? Works fine in every other browser, The page loads then the page content disappears as the BG loads? Any help would be greatly appreaciated!

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,037
    Thanks
    0
    Thanked 250 Times in 246 Posts
    It's hard to debug when there's php scripts intermingled with js. Please post the generated script. And what version of IE are you using? And is there any js error in the console?

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,123
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    The page loads and works fine in MSIE 9.

    So it's probably yet another old-IE bug. Whether in CSS or JS I don't know.

    Oh, by the way, I RSVP'ed saying there will be 27 in my party. <grin/>
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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