Hello there,

I have a website that is making use of Jquery and SWFObject to pass
HTML as a parameter to Flash.

The script is working fine on most browsers BUT in Internet Explorer.
In fact for some weird reason swfobject is not replacing the content
only the first time I click on the link (if I click on the link again
it works!!)

You can find the wholescript I'm using here: 
http://stirlingandson.co.uk/new/js/menu.js

And here is an excerpt:

//find HTML content to pass and escape the ampersands
var textToPass = $("#content").html().replace(/&/, "%26");


                //Interet Explorer will remove the quotes from the tag 
properties
(i.e <p class=test> note the lack of double quotes after 'class').
                //Use this method to add them back again
                if(!jQuery.support.htmlSerialize) {
                        var array = textToPass.split(/class=/);
                        var final= array[0];

                        for (var i = 1; i < array.length; i++){

                                final+=(addQuotes(array[i])); //add quotes and 
concatanate to one
string

                        };


                        function addQuotes(s) {
                                var r;
                                var a = s.search(/>/);
                                var t ="class='"+s.substr(0,a)+"'"; //this 
method works only if
the tag has one property

                                return t + s.substr(a);
                        }
                        textToPass=final;

                }

                var flashvars = {folder: imagefolder, text: textToPass};
                var params = {wmode: 'transparent'};

                swfobject.embedSWF("gallery.swf", "content", "825", "690", 
"9.0.0",
"js/expressInstall.swf",flashvars,params);



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to