New to the forums. So excuse if this sounds a bit silly. Is there anyway of getting document.location as a variable and then adding it to the swf object embed code.
Something like this:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript"> function getsid() {
var sid; sid = document.location.href;
} </SCRIPT>
<script type="text/javascript"> var so = new SWFObject("shared_object.swf", "mymovie", "200", "350", "8", "#fff"); so.addVariable("user_id", "getsid"); so.write("flashcontent"); </script>
You are currently setting your user_id variable value to the string "getsid". You want is to call your function getsid() which need to be modified to be:
// the below returns the value of sid back what you run the function function getsid() { var sid = document.location.href; return sid; }
then call the function in your swfobject code:
so.addVariable("user_id", getsid" ());
OR
just set sid outside of a function within the head tag and then just call it directly in swfobject