Topic: SimpleViewer v2 Works in all browsers except FF

Hello,

I've spent some time reviewing some of these forum posts and doing some research online and am still dumbfounded as to why my website works fine in other browsers but will not load the gallery in FF. Here is the code to my site and URL: http://www.ivanrudnitsky.com/

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ivan Rudnitsky Home Page</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
function first()
{
changeGal('gallery/gallery.xml');
}        
function changeGal(galurl)
{
                var flashvars = {};
                flashvars.galleryURL = galurl;
                var params = {};
                params.bgcolor = "#ffaa33";            
                params.allowfullscreen = true;
                params.allowscriptaccess = "always";
                swfobject.embedSWF("simpleviewer.swf", "flashContent" , "100%", "80%", "10.0.45.2", false, flashvars, params);
    
}
</script>
<link rel="stylesheet" type="text/css" href="text.css"/>
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<!--Start Header Title and Image here-->
<body onLoad="first();">
<div id="wrap">
    <div id="header">        
        <div id="logo-box">        
            <h1 id="logo"><a href="index.html" title="">ivanrudnitsky.com</a></h1>    
            <h2 id="slogan">The fantastic and unexpected, the ever-changing and renewing is nowhere so exemplified as in real life itself</h2>    
        </div>
    </div>
<!--End Header Title and Image here-->
 <!--Start Navigation Menu-->
<div id="menu">
        <ul>
          <li><a href="index.html" id="current">.photo</a></li>
          <li><a href="package.html">.package</a></li>
          <li><a href="ping.html">.ping</a></li>
    </ul>
</div>
<!--End Navigation Menu-->
<!-- content-wrap starts here -->
<div id="content-wrap">
    <div id="content">
    <ul>    
        <li><a href="javascript:changeGal('gallery/gallery.xml')">.wedding</a></li>
               <li><a href="javascript:changeGal('gallery/gallery2.xml')">.recent</a></li>
            <li><a href="javascript:changeGal('gallery/gallery3.xml')">.portrait</a></li>
      </ul>
<!-- main starts here -->
          <div id="main_woside">        
        <div id="flashContent">SimpleViewer requires JavaScript and the Flash Player. <a style="background-color:#fff" href="http://get.adobe.com/flashplayer/">Get Flash</a></div>
        </div>
    </div>
</div>
 <!--last div tag is for #wrap -->
 </div>
</body>
</html>

A few things to note about how I set up SimpleViewer. I wanted to use JavaScript to pull different xml files to load different galleries. Coding the function in the head tag caused a lot of initial problems in IE but after running the code through W3C validator I was able to get it going in IE and it actually worked in FF until I changed my HTML and DOCTYPE tags. Now it does not work in FF anymore.

Also, In the body tag I have it pulling gallery1.xml onLoad, which allows me to load a gallery without anyone having to click a specific gallery first. W3C validator gave me some beef about using onLoad incorrectly but I did not understand the full explanation and it does work in Chrome and IE.

Any help is greatly appreciated. Thank you,

Ivan

Re: SimpleViewer v2 Works in all browsers except FF

Start by changing your doctype to the following

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Mike Richards
SimpleViewer Support Team.

Re: SimpleViewer v2 Works in all browsers except FF

miker wrote:

Start by changing your doctype to the following

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Done. Nothing changed.

Re: SimpleViewer v2 Works in all browsers except FF

onLoad should be lower case, then your will validate, but I doubt this is the issue. If you navigate directly to the SWF at http://www.ivanrudnitsky.com/simpleviewer.swf everything works great. I think the issue is with how you are trying to use JavaScript to load different galleries.

Mike Richards
SimpleViewer Support Team.

Re: SimpleViewer v2 Works in all browsers except FF

If your gallery shows in all browsers except FireFox, it's likely that the CSS in the page is not correctly specifying a height for the gallery SWF. Check here for the solution: http://www.simpleviewer.net/simpleviewe … ml#embed_7

Felix Turner
SimpleViewer Support Team.

Re: SimpleViewer v2 Works in all browsers except FF

@Miker -- Good point. This aligns with my initial assumption that the javascript itself is causing the issues but to be honest, I don't see how or why so I find it difficult to find a solution going this route.

@Felix -- Thanks for the link. This actually fixes the problem but it creates another. I checked all my div tags and set the height at 100% and nothing changes the height nor does it fix the problem in FF. What does fix it is adding height: 100% in the html and body tag.

Once I did that, the flash loaded in FF but all of my divs were jacked up because now they were all pushed out to 100% height. Doesn't make sense to me.

--So i guess the real question is: How do I get 100% height in my body & html tags without having it carry down to the other divs?

Last edited by ivanr77 (2010-07-15 18:05:59)

Re: SimpleViewer v2 Works in all browsers except FF

The problem was in actual height of the flash movie itself. I had it automatically resizing to 100% like so:

 swfobject.embedSWF("simpleviewer.swf", "flashContent" , "100%", "100%", "10.0.45.2", false, flashvars, params);

But for some reason flash, FF or simpleviewer just doesn't like to have a 100% height option in FF. I changed the height setting (rather reluctantly, I'd rather the size be dynamic than static) to 700px like so:

 swfobject.embedSWF("simpleviewer.swf", "flashContent" , "100%", 760px, "10.0.45.2", false, flashvars, params);

And it works in FF now, but looks bad on low res...

Re: SimpleViewer v2 Works in all browsers except FF

Hi,

it is possible to have FF display a percentage height SWF. You need to ensure all the SWF's containing divs have their height explicitly set. These examples might help: http://www.simpleviewer.net/simpleviewe … #resizable

Felix Turner
SimpleViewer Support Team.