PDA

View Full Version : conflicting Scripts???


dami
07-19-2002, 12:49 PM
I added the "Favorite Icon" script to my page. (the script which allows an icon of choice to appear in the addy bar in front of my URL...and also when you save to favs.).

It was working fine....but now seems NOT to appear anymore.

The only changes I made to my page, since adding that script, was to post it in search engines for advertising. (using the meta script with KEYWORDS).

Could these two scripts be conflicting? If so, is there a way to fix it so they both will work?

____

I've also had problems in the past...with two ONLOAD scripts on one page.... they seem to conflict.... is this normal... and if so is there a way around it so I can get two online scripts to work together?....

____

If I am only allowed to post one question at a time.... please answer only the first one...it's more pressing at this time... I can post the other question at a later time.

Thanks in advance.
Dami

Mrs G
07-19-2002, 06:49 PM
No too sure about the "Fav Icon" I did it for my site but found it did not always work then I noticed that the .htaccess had been removed from my directory and would not remain when I uploaded it again.
Could be something to do with the ISP.


COnflicting Scripts.

Whenever you have more than one script on the same page make sure that a variable of the same name is not used by both scripts.

This could be, and probably is, the problem.

neil.c
07-19-2002, 07:52 PM
dami,

favicons and keywords aren't scripts, a favicon is a <link> and keywords are a <meta>. so maybe this should be in the general web building forum...

anyway, favicons are stored in your browser's cache (temporary internet files), so they will disappear after a time or if your page is changed by your hosting service. to see if it's still there, clear your cache then go back to your page. if the favicon doesn't appear, in IE you can hold shift then drag the URL icon into the main part of the address bar. if it still doesn't appear, do a View Source and see if your favicon tag has been deleted by your hosting service.

but about conflicting scripts, if you've got two onloads then you can't do this:

<body onload="blah()" onload="blip()">

you have to do this:

<body onload="blah(); blip()">

mrs G is perfectly right about same-name variables, these are usually the cause of script conflicts.

any help here?:)