www.webdeveloper.com
Results 1 to 4 of 4

Thread: IE conditional comment loading/display order??

  1. #1
    Join Date
    Feb 2012
    Location
    Brooklyn NY
    Posts
    6

    IE conditional comment loading/display order??

    Hi there.

    Is there a way to influence the order in which a browser reads my .html page?

    I would like to have IE9 load a swf AFTER the IE conditional comment is takes place.... as I have it currently coded, it will sometimes load my SWF BEFORE the conditional comment takes place.
    Thanks for looking !
    __________________________________________________________________
    Here is my Conditional comment:
    <!--[if IE 9]>
    <meta http-equiv="refresh" content="0;url=SeansWebsite_2012_IE9.html">
    <![endif]-->
    ___________________________________________________________
    Here is my Entire Page (for context):


    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>

    <!--[if IE 9]>
    <meta http-equiv="refresh" content="0;url=SeansWebsite_2012_IE9.html">
    <![endif]-->

    </script>
    <title>SeansWebsite_2012</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body>
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
    <!-- Adobe recommends that developers use SWFObject2 for Flash Player detection. -->
    <!-- For more information see the SWFObject page at Google code (http://code.google.com/p/swfobject/). -->
    <!-- Information is also available on the Adobe Developer Connection Under "Detecting Flash Player versions and embedding SWF files with SWFObject 2" -->
    <!-- Set to minimum required Flash Player version or 0 for no version detection -->
    var swfVersionStr = "10.1.52";
    <!-- xiSwfUrlStr can be used to define an express installer SWF. -->
    var xiSwfUrlStr = "";
    var flashvars = {};
    var params = {};
    params.quality = "high";
    params.bgcolor = "#000000";
    params.play = "true";
    params.loop = "true";
    params.wmode = "window";
    params.scale = "showall";
    params.menu = "true";
    params.devicefont = "false";
    params.salign = "t";
    params.allowscriptaccess = "sameDomain";
    var attributes = {};
    attributes.id = "SeansWebsite_2012";
    attributes.name = "SeansWebsite_2012";
    attributes.align = "middle";
    swfobject.createCSS("html", "height:100&#37;; background-color: #000000;");
    swfobject.createCSS("body", "margin:0; padding:0; overflow:hidden; height:100%;");
    swfobject.embedSWF(
    "SeansWebsite_2012.swf", "flashContent",
    "100%", "100%",
    swfVersionStr, xiSwfUrlStr,
    flashvars, params, attributes);
    </script>
    <!-- SWFObject's dynamic embed method replaces this alternative HTML content for Flash content when enough JavaScript and Flash plug-in support is available. -->
    <div id="flashContent">
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <p>This page requires Flash Player version 10.1.52 or higher.</p>
    </div>
    </body>
    </html>
    _______________________
    ______________________________________________________________________
    Last edited by tinytaboo; 02-09-2012 at 10:11 AM. Reason: Thanks for looking !

  2. #2
    Join Date
    Dec 2005
    Posts
    2,984
    I'm not sure if using JavaScript is faster than the meta redirect or not....

    Code:
    <!--[if IE 9]>
    <script type="text/javascript">
     window.location = redirected_url;
    </script>
    <![endif]-->

    Important question here though, why are you redirecting IE9 users?
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...
    awesome.

  3. #3
    Join Date
    Feb 2012
    Location
    Brooklyn NY
    Posts
    6

    Thanks!.. this is why I redirect IE9 users

    Ill give this a try..

    I am re-directing (and Im sure that this is hacky .. ) because for some reason that Is beyond my comprehension.. My SWF is appearing only about 50 px high and long all across the top of the browser window (in IE9 only). It loads perfectly in all other browsers.

    It is due to my SWF "Publishing Settings>Scaling>Default"
    so the swf will resize when the browser window is altered manually.
    For some reason this is BREAKING with IE9 and the browser is Displaying the ENTIRE length of my SWF (Not just the canvas area that I would like visible, but the entire thing . even the hidden "offscreen" area on the left and right"

    Here is the Code that does NOT function in EI9:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    	<head>
    		<title>SeansWebsite_2012</title>
    		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    		<script type="text/javascript" src="swfobject.js"></script>
    		<script type="text/javascript">
    			<!-- Adobe recommends that developers use SWFObject2 for Flash Player detection. -->
    			<!-- For more information see the SWFObject page at Google code (http://code.google.com/p/swfobject/). -->
    			<!-- Information is also available on the Adobe Developer Connection Under "Detecting Flash Player versions and embedding SWF files with SWFObject 2" -->
    			<!-- Set to minimum required Flash Player version or 0 for no version detection -->
    			var swfVersionStr = "10.1.52";
    			<!-- xiSwfUrlStr can be used to define an express installer SWF. -->
    			var xiSwfUrlStr = "";
    			var flashvars = {};
    			var params = {};
    			params.quality = "high";
    			params.bgcolor = "#000000";
    			params.play = "true";
    			params.loop = "true";
    			params.wmode = "window";
    			params.scale = "showall";
    			params.menu = "true";
    			params.devicefont = "false";
    			params.salign = "t";
    			params.allowscriptaccess = "sameDomain";
    			var attributes = {};
    			attributes.id = "SeansWebsite_2012";
    			attributes.name = "SeansWebsite_2012";
    			attributes.align = "middle";
    			swfobject.createCSS("html", "height:100&#37;; background-color: #000000;");
    			swfobject.createCSS("body", "margin:0; padding:0; overflow:hidden; height:100%;");
    			swfobject.embedSWF(
    				"SeansWebsite_2012.swf", "flashContent",
    				"100%", "100%",
    				swfVersionStr, xiSwfUrlStr,
    				flashvars, params, attributes);
    		</script>
    	</head>
    	<body>
    		<!-- SWFObject's dynamic embed method replaces this alternative HTML content for Flash content when enough JavaScript and Flash plug-in support is available. -->
    		<div id="flashContent">
    			<a href="http://www.adobe.com/go/getflash">
    				<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    			</a>
    			<p>This page requires Flash Player version 10.1.52 or higher.</p>
    		</div>
    	</body>
    </html>
    Last edited by tinytaboo; 02-09-2012 at 12:05 PM.

  4. #4
    Join Date
    Feb 2012
    Location
    Brooklyn NY
    Posts
    6
    I meant It is due to my SWF "Publishing Settings>Scaling>Default"

    "Default" is params.scale = "showall";

    thats what is breaking things in EI9 I think...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles