Replacing Flash Image with Gif when Flash not Supported

I’m endeavoring to replace a flash image which includes a gif when adobe flash isn’t supported (eg on iPad)

I’ve found several code (see below) and inserted the pertinent images and inserted the code leading to a closing body label.

Although the shots are showing very good where they’re said to be (just under the header), there is furthermore a box that comes up at the bottom of the page which has a question mark within a small blue square).

I’ve tried fit this code from the head but this particular box then appears with the top. This doesn’t look a problem around Firefox but it definitely is in Safari. We’ve not tested within IE or Chrome as I can’t obtain these on my personal mac.

Does anyone recognize how I can do away with this box However I’m fine along with CSS and html, I know nothing at all about javascript hence can’t work out how to get round this difficulty and would definitely appreciate any help anyone can grant. I could put a bit margin on the bottom of the web site but I’d rather find a solution rather than seeking to hide the field.

Here’s the link to the website http: //www. londonproduce. co. uk/a2efc9mm3p-5

and here’s that code I’ve inserted leading to a closing body tag

< SCRIPT LANGUAGE=JavaScript1. 1>
<! —
var MM_contentVersion = HALF A DOZEN;
var wordpress tool = (navigator. mimeTypes & & navigator. mimeTypes" application/x-shockwave-flash" ) navigator. mimeTypes" application/x-shockwave-flash". enabledPlugin: 0;
in the event that ( plugin )
var text = navigator. plugins" Shockwave Flash". story. split(" " );
regarding (var i = 0; my partner and i < words. length; ++i)

in the event that (isNaN(parseInt(words)))
carry on;
var MM_PluginVersion = words;

var MM_FlashCanPlay = MM_PluginVersion > = MM_contentVersion;

other than them if (navigator. userAgent & & navigator. userAgent. indexOf(" MSIE" )> =0
& & (navigator. appVersion. indexOf(" Win" )! = -1))
insurance policy. write(‘< SCR’ + ‘IPT LANGUAGE=VBScript\> \n’); //FS conceal this from IE4. YOUR FIVE Mac by busting the tag
insurance policy. write(‘on error cv next \n’);
insurance policy. write(‘MM_FlashCanPlay = ( IsObject(CreateObject(" ShockwaveFlash. ShockwaveFlash. " & MM_contentVersion)))\n’);
insurance policy. write(‘< /SCR’ + ‘IPT\> \n’);

in the event that ( MM_FlashCanPlay )
insurance policy. write(‘< OBJECT classid=" clsid27CDB6E-AE6D-11cf-96B8-444553540000" ‘);
insurance policy. write(‘ codebase=" http: //download. macromedia. com/pub/shockwave/cabs/flash/swflash. cab#version=6, 0, 0, 0" ‘);
insurance policy. write(‘ ID=" script" WIDTH=" 924" HEIGHT=" 200" ALIGN=" " > ‘);
insurance policy. write(‘ < PARAM NAME=movie VALUE=" script. swf" > < PARAM NAME=quality VALUE=high> < PARAM NAME=bgcolor VALUE=#FFFFFF> ‘);
insurance policy. write(‘ < UPLOAD src=" fruitandveg. swf" quality=high bgcolor=#FFFFFF ‘);
insurance policy. write(‘ swLiveConnect=FALSE WIDTH=" 924" HEIGHT=" 200" NAME=" script" ALIGN=" " ‘);
insurance policy. write(‘ TYPE=" application/x-shockwave-flash" PLUGINSPAGE=" http: //www. macromedia. com/go/getflashplayer" > ‘);
insurance policy. write(‘ < /EMBED> ‘);
insurance policy. write(‘ < /OBJECT> ‘);
insurance policy. write(‘< IMG SRC=" london-produce-fast. gif" WIDTH=" 924" HEIGHT=" 200" usemap=" #script" BORDER=0> ‘);

< /SCRIPT> < NOSCRIPT> < IMG SRC=" london-produce-fast. gif" WIDTH=" 924" HEIGHT=" 200" usemap=" #script" BORDER=0> < /NOSCRIPT>

TWO things…

JUST ONE. it shouldn’t go leading to a /body, it should can start the flash div (in place of your respective < object> element), so that it renders the particular obect / img from the appropriate place, and

TWO. it looks like you’ve the paths completely wrong. Your flash file is /MEDIA, I’m accepting the gif is actually, too

Thus change these 4 lines:

document. write(‘ < PARAM NAME=movie VALUE=" /MEDIA/fruitandveg. swf" > < PARAM NAME=quality VALUE=high> < PARAM NAME=bgcolor VALUE=#FFFFFF> ‘);

document. write(‘ < UPLOAD src=" /MEDIA/fruitandveg. swf" quality=high bgcolor=#FFFFFF ‘);

document. write(‘< IMG SRC=" /MEDIA/london-produce-fast. gif" WIDTH=" 924" HEIGHT=" 200" usemap=" #script" BORDER=0> ‘);

< /SCRIPT> < NOSCRIPT> < IMG SRC=" /MEDIA/london-produce-fast. gif" WIDTH=" 924" HEIGHT=" 200" usemap=" #script" BORDER=0> < /NOSCRIPT>

Besides that, it is working as supposed.

PS – While you’re from it, you should change all the HTML to lowercase and add quotes about your attributes, along with trailing slashes wherever appropriate (e. gary. < param name=" bgcolor" /> ) so that the HTML is actually valid

That’s brilliant. I’ve became it working today. many thanks to your help

Really welcome. That JS appears really old, however… change < SCRIPT LANGUAGE=JavaScript1. 1>
to help < script type=" text/javascript" > so it’s valid too.

It absolutely was just some WHEN I found online. I really never have got a clue in terms of javascript! I’ll make which change though – cheers.

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *