/    Sign up×
Community /Pin to ProfileBookmark

I need this little script to work with Netscape

What should i do to make this work under Netscape ? (Netscape 6 & +, don’t bother with 4)

Script :
function swapTree(menuDiv,fol)
{
window.focus();
d=eval(“document.all.”+menuDiv);
i=eval(“document.all.img_“+menuDiv);
i1=eval(“document.all.img_
“+fol);
if (d.style.display==”none”)
{
d.style.display=”block”;
i.src=’../img/minus.gif’;
i1.src=’../img/foldero.gif’;
}
else
{
d.style.display=”none”;
i.src=’../img/plus.gif’;
i1.src=’../img/folder.gif’;
}

}

Many thanks !!!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63May 09.2003 — document.getElementById

it works for both IE and NS
Copy linkTweet thisAlerts:
@MotaboboauthorMay 10.2003 — Hi !

Thanks for your fast reply ?

Unfortunately, i don't know javascript at all ! (compared to ASP :rolleyes: )

Anyway, where should i put this ?

Instead of Document.all ?

Could you re-write the complete done script since it is that small please ?

Thanks
Copy linkTweet thisAlerts:
@MotaboboauthorMay 10.2003 — Thanks a lot Dave, it now works even though there is a little bug ?

I'll try to fix that
×

Success!

Help @Motabobo 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...