Topic: SW just not loading under IE :(

I just don't get why, I have tested that things 100 times in all ways I can think of.. it just won't work under IE:
http://dev.eclecticshot.com/

It works with:
- firefox (mac)
- firefox (win)
- safari (mac)
- chrome (win)

but not ie... it throws a JS error in the JQuerry file ?!?!...

And the weirdest of all, is that if I turn on the JS debuggeur and just skip the "error" it will work just fine and load the gallery...

I am loosing it... please help !

Alex

Re: SW just not loading under IE :(

Have you tried temporarily removing some of your other JavaScripts to see if there is a conflict?

Also you have an ampersand in your meta data this can cause random issues, b&w should be b&w.

Mike Richards
SimpleViewer Support Team.

Re: SW just not loading under IE :(

What version of IE and Windows are you running?

Felix Turner
SimpleViewer Support Team.

Re: SW just not loading under IE :(

You have not specified a DOCTYPE declaration for the page.
Use the following code at the very beginning of the document (before the <html> tag).

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

Also, validating the page through the W3C validator shows a few errors that should be fixed.

Steven Speirs
SimpleViewer Support Team.

Re: SW just not loading under IE :(

Felix, I am trying with IE 8. On a windows 7 computer.

Alex

Re: SW just not loading under IE :(

Ok... I tried everything you said...

Fixed the doc type, ran it throughout the checker, fixed all errors and warning, fixed the meta tag.
Still the same pb, IE give me an error in the JQuery File.

I even tried to deactivate as much JS as I could, all my fancy resizing, position, etc. is gone. No API uses nothing.. just the script minimum,  not even google analytics nor flattr.

Still the same pb !! I am going crazy over this sad

You can see for yourselves:

working version under all browser expect IE (tested only with IE8): http://dev.eclecticshot.com/
The same one working with the same browser without javascript: http://dev.eclecticshot.com/index-nojs.php

still does not work under IE sad

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Wed, 29 Sep 2010 08:08:32 UTC


Message: Invalid argument.
Line: 12
Char: 12949
Code: 0
URI: http://dev.eclecticshot.com/svcore/js/j … 3.2.min.js

I even tried to replace my jQuery file in case it got corrupte.. but no... won't work sad

Alex

Re: SW just not loading under IE :(

Ok I found the pb.... I can't believe it... I am not crazy it was not me !

There are bugs in loading the SWF on IE.

 SV.simpleviewer.load('sv-container', '100%', '100%', '222222', true); 

will work

but

 SV.simpleviewer.load('sv-container', '100px', '100px', '222222', true); 

will break the page and flash will not load properly

The solution ??? remove the "px"....

 SV.simpleviewer.load('sv-container', '100', '100', '222222', true); 

will work on IE as well on the other browsers... but only IE is - for some reason that has to do with JQuery I think - choking on "100px"...

Anyway... it took me 2 days to figure it out... maybe it will help others...

Alex

ps: I have found another bug on IE, if you are using the getLocation Api to do direct linking, it does not work entirely. The url refreshes fine when changing image, but the format is your.url.com/#/7 rather than your.url.com/#7. Also entering your.url.com/#/7 or (entering the proper format your.url.com/#7 works fine) in a new browser will not bring you to image 7 as it does on other browser but load from 0 !

Re: SW just not loading under IE :(

The solution ??? remove the "px"....

Yes, fixed hight or width should not use px. Sorry I must have missed that, because you were using vars in your SV.simpleviewer.load line.

ps: I have found another bug on IE, if you are using the getLocation Api to do direct linking, it does not work entirely. The url refreshes fine when changing image, but the format is your.url.com/#/7 rather than your.url.com/#7. Also entering your.url.com/#/7 or (entering the proper format your.url.com/#7 works fine) in a new browser will not bring you to image 7 as it does on other browser but load from 0 !

This is an issue with how SWFAddress is being implemented, I use SWFAddress on my site with different code that does not have this issue.

Here is the JavaScript version of my ActionScript code.

            //Called by SWF when user views an image
            function svImageChange(index){
                imageID = index + 1
                SWFAddress.setValue("/"+imageID+"/");
            }
            
            //Called when browser back button is clicked
            SWFAddress.onChange = function(){
                if(svAPI.getImageIndex() != getLocationIndex()) {
                    svAPI.showImage(getLocationIndex());
                }
            }

            function getLocationIndex() {
                var path = SWFAddress.getValue();
                var arr = path.split("/");
                return arr[1] - 1;    
            }
Mike Richards
SimpleViewer Support Team.

Re: SW just not loading under IE :(

Sweeet ! That indeed works perfectly smile

Thanks !

While we are talking about the index and direct url link...

One thing that bothers me, since I am using flickr in the back, is that if I added a new picture on flickr, or change the sort order etc.
For the moment my images are sorted by "interestingness" therefore likely to change over time...

So I was thinking that maybe instead of using simple ID based on image order within the gallery I could implement something more pertinent by using the Flickr ID of the picture ? That way it would be a true "hard link", additionally this would avoid screwing up the analytics on the pictures.

Any idea on how to do something like this ? I am not asking to be given the code, I don't mind spending the time, but just some pointers as I don't know where to start looking...

Thanks,

Alex

Re: SW just not loading under IE :(

Try using javascript or php or whatever to pull the images from flickr and create a dynamic XML based on what you pull. I don't really know the fickr API, but there are example on the forums for generating dynamic XMLs with php.

Mike Richards
SimpleViewer Support Team.

Re: SW just not loading under IE :(

So instead of using the embedded flickr functionality, so think I should create my own api call and generate on the fly XML that would be used to load the gallery ?
How is that going to change the index ? Sorry, not being stubborn, I just don't understand exactly what you mean ?

Thanks,

Alex

Re: SW just not loading under IE :(

So instead of using the embedded flickr functionality, so think I should create my own api call and generate on the fly XML that would be used to load the gallery ?

Yes, I don't use flickr myself so I don't know a lot about it, but SimpleViewer only supports flickr Tags, flickr Set, and flickr Group. You had said that you wanted a way to "hard link" to the images. SimpleViewer is not going to be able to do this for you out of the box. If I'm understanding your correctly you will need create a script that pulls the image data from flickr, formats it and pass it to SimpleViewer as an XML. If you search the forums there are example of how to format and feed xml to SimpleViewer, you will just need to figure out the flickr api.

http://www.simpleviewer.net/simpleviewe … tml#flickr

How is that going to change the index ?

I'm not sure what you are asking here.

Mike Richards
SimpleViewer Support Team.