Re: Problem with global variables and buttons
- From: Lee <REM0VElbspamtrap@xxxxxxx>
- Date: 12 Aug 2007 08:42:19 -0700
viola823@xxxxx said:
Nothing. It would appear that you think setting an event handler attribute
(here: onClick) makes its value execute automatically when the corresponding
element is rendered; that is not the case. The event handler code is
executed when the event occurs, not before. In this case, it is executed
when you click the button (hence "onclick").
So there's no any way to do it by the buttons? :/
Thomas has misunderstood your problem.
It's annoying to have to pull him out of the killfile again
to see how he's confused somebody else.
When you use document.write() to display the value of a variable
on a page, it writes the current value as of the time that
document.write() statement is executed. If you later change the
value by executing an event handler, the string that has already
been written to the page will not change.
Your functions work.
--
.
- References:
- Problem with global variables and buttons
- From: viola823
- Re: Problem with global variables and buttons
- From: viola823
- Problem with global variables and buttons
- Prev by Date: Re: Parallele Ajax, parameters to response handler?
- Next by Date: Re: query parameters at the end of the JavaScript file
- Previous by thread: Re: Problem with global variables and buttons
- Next by thread: Re: Problem with global variables and buttons
- Index(es):
Relevant Pages
|