Hi! Sorry for the late reply! I've been very bussy.
I think the error might bee here
-
var isIE = navigator.appName.indexOf("Microsoft") != -1;
-
return (isIE) ? window[song]:document[song];
-
More exactly in the last line, you put window[song], but when using the array object notation (like an associative array), the index must be passed as a string, otherwise the script will look for a song variable and it won't find it. If for some reason it works in firefox I don't know why.
Is the song a variable? If not correct that, pass it as a string (between quotes) like this window["song"]:document["song"];
Another thing I find strage in your code is that your movie's id is "Mp3Player", that's why I need to know if song is a variable containing this value, "Mp3Player", or what.
Please if you didn't post the full code, post it, because I need to see it completely.
Best regards,
The_Nephilim
thanks so much for the reply buddy..!!!
Here is the code....
<!--html code-->
<object type="application/x-shockwave-flash" data="Mp3Player.swf" id="Mp3Player" width="300" height="30">
<param name="movie" value="Mp3Player.swf" />
<embed src="Mp3Player.swf" width="300" height="30" quality=high pluginspage="http://www.macromedia.com/go/getflashplayer" type='application/x-shockwave-flash' id="Mp3Player">
</embed>
</object>
<!--ends here--------->
<script>
function playsong(song)//called once click on the url
{
detect_browser("Mp3Player").asFunc(song);
}
function detect_browser(song)//for crossbrowser,returns true if it's IE else False
{
alert(navigator.appName);
var isIE = navigator.appName.indexOf("Microsoft") != -1;
return (isIE) ? window[song]:document[song];
}
looking for the help........
cheeeers,
vinni