HighDots Forums  

Re: Increase displayed variable after clicking button

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Increase displayed variable after clicking button in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
VK
 
Posts: n/a

Default Re: Increase displayed variable after clicking button - 07-04-2005 , 07:05 AM






Quote:
What I want to do is that variable is increased every
time button is pressed (and, of course, that increased
value is displayed than at screen, so it could be
increased again)
See <http://www.jibbering.com/faq/#FAQ4_15>

document.write() and document.writeln() if used after the page is
loaded *clear* the entire content of the page (including any script).
So the only time and place they don't do that is at the moment of the
arrival, so you can use them is the original page body, so your page
could self-adjust depending on the place of the arrival.

P.S. Rather difficult to express it clearly in human words, is it? From
my experience it usually means that there is something wrong with the
concept itself (?).

I would let people simply do:
someHTMLObject.write(hewHTMLContent);

What a hey difference anyway from:
someHTMLObject.innerHTML = hewHTMLContent;

At least the consistency would be kept.



Reply With Quote
  #2  
Old   
Zeljko
 
Posts: n/a

Default Re: Increase displayed variable after clicking button - 07-04-2005 , 08:04 AM






Thanks (both of you)! It was just what I was looking for.

VK wrote:
Quote:
What I want to do is that variable is increased every
time button is pressed (and, of course, that increased
value is displayed than at screen, so it could be
increased again)

See <http://www.jibbering.com/faq/#FAQ4_15

document.write() and document.writeln() if used after the page is
loaded *clear* the entire content of the page (including any script).
So the only time and place they don't do that is at the moment of the
arrival, so you can use them is the original page body, so your page
could self-adjust depending on the place of the arrival.

P.S. Rather difficult to express it clearly in human words, is it? From
my experience it usually means that there is something wrong with the
concept itself (?).

I would let people simply do:
someHTMLObject.write(hewHTMLContent);

What a hey difference anyway from:
someHTMLObject.innerHTML = hewHTMLContent;

At least the consistency would be kept.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.