/    Sign up×
Community /Pin to ProfileBookmark

new to js…help plea

hallo and thx for popping in to help?!!!

i’m not a rpogrammer at all….and i just leech on codes,thx for free codes to you as well.

i have a problem in using a mouseover js:

Mouse Banner by Peter Gerhig Dec. 29 1999 in A-Z scripts
of this site;it gives me an error in debug::

<–in the code that goes in the head–>

var thisspan = eval(“document.span” + i);

warning 5002 var “thisspan” already defined…

??what does that mean??

my assumpition was that i had to change something in the line or to create that “document.span”and i’ve been looking around the web(dev.tut.in this site included)becouse even if i dunnov js at all at least i know few basics of apple script …but no results…
???

please can u send me a mail or post a message here thx.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@freefallJul 08.2003 — Probably if you checked through the rest of your code, you would see "var thisspan" more than once. The "var" is what initially makes this a variable. Once it's made, it remains a variable until the function or page is closed. So if you put "var thisspan" more than once, it confuses the browser.

After the first ever var thisspan =

the rest should be simply thisspan =

So your line should be

thisspan = eval("document.span" + i);

Hope that helps,

Ian
×

Success!

Help @anda001 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...