Script за разпознаване на Flash и..
6 отговора
169 прегледа
Script за разпознаване на Flash и..
Трябва ми script, който да разпознава дали съществува Flash plug-in и ако няма да го сменя с gif.Отнася се само за един banner.
Re: Script за разпознаване на Flash и..
<script language="JavaScript">
if ((navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") == -1 &&
navigator.appVersion.indexOf("3.1") == -1) ||
(navigator.plugins && navigator.mimeTypes["application/x-shockwave-flash"]))
{
document.writeln('<OBJECT codebase="[линк]" width=100 height=100 border=0><PARAM name=movie value="/files/flash/my_flash.swf"> <embed src="/files/flash/my_flash.swf" width=100 height=100 border=0 palette="background" type="application/x-shockwave-flash" AutoStart="true"></EMBED></OBJECT>')
}
else
{
document.writeln('<img src="/files/images/my_ani.gif" width=100 height=100 border=0>');
}
</script>
Syzhalqvam za loshoto formatirane.
S uvazhenie
bofh
if ((navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") == -1 &&
navigator.appVersion.indexOf("3.1") == -1) ||
(navigator.plugins && navigator.mimeTypes["application/x-shockwave-flash"]))
{
document.writeln('<OBJECT codebase="[линк]" width=100 height=100 border=0><PARAM name=movie value="/files/flash/my_flash.swf"> <embed src="/files/flash/my_flash.swf" width=100 height=100 border=0 palette="background" type="application/x-shockwave-flash" AutoStart="true"></EMBED></OBJECT>')
}
else
{
document.writeln('<img src="/files/images/my_ani.gif" width=100 height=100 border=0>');
}
</script>
Syzhalqvam za loshoto formatirane.
S uvazhenie
bofh
Re: Script за разпознаване на Flash и..
Blagodarq ti mngo, samo imam oshte edin wypros- towa za IE li se otnasq samo.
Blagodarq otnowo!
Blagodarq otnowo!
Re: Script за разпознаване на Flash и..
Ne samo ;) bi sledvalo da raboti s "vseki" browser koito poddyrzha shockwave-flash.
Probvai, ako se izdyni s nqkoi browser dai detailna informaciq.
Uspeh ;)
bofh
Probvai, ako se izdyni s nqkoi browser dai detailna informaciq.
Uspeh ;)
bofh
Re: Script за разпознаване на Flash и..
Ami az ne moga da razbera dali ne raboti zashtoto kyde moga da namerq PC na koeto nqma instaliran Flash Plug-in :))
A za IE piram zashtoo w scripta pishe
appName == "Microsoft Internet Explorer"
a za Netscape nishto ne widqh.
Shte probwam i shte kava dali wyrwi.
A za IE piram zashtoo w scripta pishe
appName == "Microsoft Internet Explorer"
a za Netscape nishto ne widqh.
Shte probwam i shte kava dali wyrwi.
Re: Script за разпознаване на Flash и..
Dobre, do momenta wsiko wyrwi samo ne moga da razbera zashto trqbwa da slagam dwa pyti flasha.Za kakwo e ediniq pyt i za kakwo drugiq.
Maj mnogo wzeh da pitam...no ti si predlovi uslugite :))
Maj mnogo wzeh da pitam...no ti si predlovi uslugite :))
Re: Script за разпознаване на Flash и..
Syntax <OBJECT>...</OBJECT>
Attribute Specifications DATA=URI (object data)
CLASSID=URI (location of implementation)
ARCHIVE=CDATA (archive files)
CODEBASE=URI (base URI for CLASSID, DATA, ARCHIVE)
WIDTH=Length (object width)
HEIGHT=Length (object height)
NAME=CDATA (name for form submission)
USEMAP=URI (client-side image map)
TYPE=ContentType (content-type of object)
CODETYPE=ContentType (content-type of code)
STANDBY=Text (message to show while loading)
TABINDEX=NUMBER (position in tabbing order)
DECLARE (do not instantiate object)
ALIGN=[ top | middle | bottom | left | right ] (object alignment)
BORDER=Length (link border width)
HSPACE=Pixels (horizontal gutter)
VSPACE=Pixels (vertical gutter)
common attributes
Contents PARAM elements followed by block-level elements and/or inline elements
това горе е за 4.0 (HTML)
цитатите по-долу за за HTML 3.0
The EMBED tag allows the insertion of arbitrary objects directly into an HTML page. Embedded objects are supported by application-specific plug-ins. EMBED can take arbitrary attributes.
The following general attributes are defined on EMBED:
SRC (required) - Specifies source URL.
HEIGHT - The object's image will be scaled to fit the specified height and width.
WIDTH - The object's image will be scaled to fit the specified height and width.
Мисля че това обяснява защо имаш и object и embed tag-ове
Успех
bofh
Attribute Specifications DATA=URI (object data)
CLASSID=URI (location of implementation)
ARCHIVE=CDATA (archive files)
CODEBASE=URI (base URI for CLASSID, DATA, ARCHIVE)
WIDTH=Length (object width)
HEIGHT=Length (object height)
NAME=CDATA (name for form submission)
USEMAP=URI (client-side image map)
TYPE=ContentType (content-type of object)
CODETYPE=ContentType (content-type of code)
STANDBY=Text (message to show while loading)
TABINDEX=NUMBER (position in tabbing order)
DECLARE (do not instantiate object)
ALIGN=[ top | middle | bottom | left | right ] (object alignment)
BORDER=Length (link border width)
HSPACE=Pixels (horizontal gutter)
VSPACE=Pixels (vertical gutter)
common attributes
Contents PARAM elements followed by block-level elements and/or inline elements
това горе е за 4.0 (HTML)
цитатите по-долу за за HTML 3.0
The EMBED tag allows the insertion of arbitrary objects directly into an HTML page. Embedded objects are supported by application-specific plug-ins. EMBED can take arbitrary attributes.
The following general attributes are defined on EMBED:
SRC (required) - Specifies source URL.
HEIGHT - The object's image will be scaled to fit the specified height and width.
WIDTH - The object's image will be scaled to fit the specified height and width.
Мисля че това обяснява защо имаш и object и embed tag-ове
Успех
bofh