/    Sign up×
Community /Pin to ProfileBookmark

need help hiding text in JS

<h1><a href=”http://www.mozilla.org“>
[COLOR=firebrick]<script language=”JavaScript” type=”text/javascript”>
<!– hide this from other browsers
if (navigator.appName == “Microsoft Internet Explorer”)
document.writeln(“Download Mozilla… much better.”);
//done hiding
</script>[/COLOR]

</a>
</h1>

so if you check my [URL=http://fadi.omniro.com]site[/URL] with IE you’ll get the msg that you need to get mozilla but if use any other browser then it won’t show and that’s what exactly I want it to do!
However if I use this code up in the beginning of page everything get screwy if I don;t use <p></p> then i lose next image if I use the <p></p> i lose the whole text aaaaaaah can you improve this code for me?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@neil9999Feb 26.2004 — Bear in mind that people not using mozilla can still see your page simply by disabling javascript.

Neil
Copy linkTweet thisAlerts:
@fadiauthorFeb 26.2004 — That's ok the purpose of my JS just to show the msg to peep who uses IE with JS
Copy linkTweet thisAlerts:
@neil9999Feb 26.2004 — I've just visited your site with IE 6 - I could still see it and i had javascript enabled. I got no 'Get mozilla' message.

Neil
Copy linkTweet thisAlerts:
@fadiauthorFeb 26.2004 — scroll down!
×

Success!

Help @fadi 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.18,
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,
)...