...

View Full Version : what is wrong in this code



sugata_bhar
10-26-2006, 02:08 PM
var u_agent = navigator.userAgent;
if (u_agent.indexOf('Firefox') != -1) {
document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"32\" height=\"32\"><param name=\"movie\" value=\"glow_device2.swf\" /><param name=\"quality\" value=\"high\" /><embed src=\"glow_device2.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"32\" height=\"32\"></embed></object>");
}
else
{
document.writeln("<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" CODEBASE=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab\" ID=\"testmovie1\" width=\"32\" height=\"32\" style=\"margin-left:15px;position:absolute; top:434px; left:595px; z-index:1; cursor:hand;\" border=\"0\" id=\"obj2\" name=\"obj2\" title=\"Next:Plant new ideas\"><PARAM NAME=\"MOVIE\" VALUE=\"glow_device2.swf\"><PARAM NAME=\"QUALITY\" VALUE=\"high\"><PARAM NAME=\"SCALE\" VALUE=\"SHOWALL\"><EMBED NAME=\"testmovie1\" SRC=\"glow_device2.swf\" WIDTH=\"32\" HEIGHT=\"32\" QUALITY=\"high\" SCALE=\"SHOWALL\" swLiveConnect=\"true\" PLUGINSPAGE=\"http://www.macromedia.com/go/flashplayer/\"></EMBED></OBJECT>");
}

_Aerospace_Eng_
10-26-2006, 02:17 PM
Nothing seems to be wrong with it but why are you trying to use browser detection to output flash?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum