[SWFObject] Short Param name problem
Aran Rhee
aran.rhee at qdc.net.au
Thu Sep 28 16:38:51 PDT 2006
Nathan.
A fix was implemented in 1.4.2. Please update to 1.44 and see if that sorts
out your issue.
Cheers,
Aran
> -----Original Message-----
> From: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of
> Nathan L.Hoover
> Sent: Friday, 29 September 2006 12:47 AM
> To: swfobject at lists.deconcept.com
> Subject: [SWFObject] Short Param name problem
>
> Hello all,
>
> I have been using the 1.4 version of SWFObject for about six
> months, and are loving the script. It definitely solves a lot
> of my usability problems.
>
> However, after implementing a new online store, I found an
> issue with the getQueryParamValue function for the embed. The
> problem was that the store was adding a GET variable for
> "osCid", and my SWF is using a GET variable named "d". So if
> the osCid variable was set, the SWFObject embed would pick it
> up and assign it to my d variable. Obviously, this produced
> non-expected results.
>
> I fixed the problem by modifying the getRequestParameter
> function on line 118:
>
> // Modified the getRequestParameter function to account for
> short GET variable names that // may be part of a larger GET
> variable name
> deconcept.util={getRequestParameter:function(_2b)
> {
> var q=document.location.search||document.location.hash;
> if(q)
> {
> var _2d=q.indexOf("?"+_2b+"=");
> if( _2d == -1 )
> _2d=q.indexOf("&"+_2b+"=");
>
> if(q.length > 1 && _2d > -1 )
> {
> var _2e=(q.indexOf("&",_2d) >
> -1) ? q.indexOf("&",_2d):q.length;
> return
> q.substring(q.indexOf("=",_2d)+1,_2e);
> }
> }
> return "";
> }
> This is in no way an elegance solution to the problem, but it
> works for me. Thanks for all of the hard work.
>
>
> Nathan
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
More information about the Swfobject
mailing list