/    Sign up×
Community /Pin to ProfileBookmark

Dynamic Message Window

I have a web page that I created that uses these JS pop up messages. Since I’m fairly new to web development (and JS), I pulled a stupid and didn’t check to see if this script would work in Netscape. It’s not major but I would like to be able to get to work in NS if possible. The error I get (through the Javascript console) is “add is not defined.” Is there a way I can modify it to get it to work in NS.

This is the code from the JS script source web site.

<SCRIPT LANGUAGE=”JavaScript”>

function chen()
{
add.value=”Web Site JavaScript Source nhttp://javascript.internet.com/nPart of the INT Media Groupnhttp://www.internet.comnThanks for visiting usnCome back soon!”
add.style.height=120
add.style.width=260
}
function dis()
{
add.value=””
add.style.height=0
add.style.width=0
}
</script>
?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryDec 12.2002 — I think you need to use document.getElementById("add") in place of just add, in order to correctly reference the object in all browsers.

Hope this helps.

Adam
Copy linkTweet thisAlerts:
@gil_davisDec 12.2002 — <rant>Why doesn't anyone post version numbers and other important specifics?</rant>

What version of NS?

What is "add" supposed to be? Did you create it somewhere? Is it an HTML object?

<rant>Is it bigger than a bread box? Animal or vegetable?</rant>
Copy linkTweet thisAlerts:
@jackwauthorDec 16.2002 — The document.getElementById seems to work. I just have to do a little tweaking.

Thanks Adam

P.S.

? gil.... Thanks for the reminder about versions and stuff.

I'm still somewhat new to developing and forget to include that stuff sometimes.

The script came from the [URL=http://javascript.internet.com/messages/dynamic-message-window.html]internet.javascript.com[/URL] website.

And I am trying to get it working specifically for NS 6.2 and above.
×

Success!

Help @jackw 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.23,
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,
)...