🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #9567

Dynamically redefining events

#9567
From: Rik VdB
Date: Sat, 27 Apr 2002 15:22
25 lines
1986 bytes
Hi there,

I have a problem with Javascript DHTML programming for IE5.5 :

as you may know, it is possible to dynamically modify the onclick behaviour
as follows :
document.getElementById('name').onclick=functionname
with functionname a parameterless function that is defined somewhere in my
javascript file.
This works fine but the problem seems to be that at the moment the above JS
statement is executed, an IE alert window appears which shows the complete
content of the function. Just a display, the code is not executed !
After clicking ok for this alert window, the corresponding onclick behaviour
of  the element called 'name' is correct, i.e. when clicking it the function
'functionname' is executed as desired.
Anyone know why this obsolete alert window appears ???????
In my case the function named functionname actually contains about 30
statements which means this complete codelisting is displayed in the alert
window :(

Can anyone help me pleeeeeeeeeeaaaaaaaaaaaaase ?

Many thanks in advance !

Rik
Technical Details
Message-ID: <3ccac24c$0$12222$4d4efb8e@news.be.uu.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.online.be!195.129.110.18.MISMATCH!bnewspeer00.bru.ops.eu.uu.net!bnewsifeed02.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.uu.net!news.be.uu.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcea4,89423a03a35f5fff,start
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2002-04-27 08:23:29 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.online.be!195.129.110.18.MISMATCH!bnewspeer00.bru.ops.eu.uu.net!bnewsifeed02.bru.ops.eu.uu.net!bnewspost00.bru.ops.eu.uu.net!emea.uu.net!news.be.uu.net!not-for-mail
From: "Rik VdB" <Rik.VdB@pipo.com>
Newsgroups: be.comp.programming
Subject: Dynamically redefining events
Date: Sat, 27 Apr 2002 17:22:50 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Lines: 28
Message-ID: <3ccac24c$0$12222$4d4efb8e@news.be.uu.net>
NNTP-Posting-Host: uu212-190-170-121.unknown.uunet.be
X-Trace: 1019920972 news.be.uu.net 12222 212.190.170.121
X-Complaints-To: abuse@be.uu.net