Re: Problem with global variables and buttons



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.


--

.



Relevant Pages

  • Re: Re-number a column for all rows in RowChanged event?
    ... a way to prevent event handler code to be executed. ... // Reset event blocking flag. ... execute; you can simply derive ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Execute code behind a form via VBA Automation
    ... If the VBA code changes the value of any standard property, ... code you have set to run in the Item_PropertyChange event handler will ... scripts to execute. ...
    (microsoft.public.outlook.program_vba)
  • Re: How to handle this (Pros help)
    ... Have the Service use a timer. ... The event handler ... the timer, execute the SP, and just before returning, restart the timer. ... > Now the stored proc in the database takes a while so is there a way not to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: More client server problems
    ... is there a way to put the event handler in another thread? ... > to create a descedant of that class overriding Execute its method: ... > constructor Create(Server, ClientID, Parent); ...
    (borland.public.delphi.language.objectpascal)
  • Re: open a form
    ... "When the Click event of button1 is fired, execute the code in the method ... For example, the following code specifies ... > the event handler button1_Click handles the Click event of a Button ...
    (microsoft.public.dotnet.languages.csharp)