Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #33651

Re: Displaying second page on click

Newsgroups comp.lang.javascript
Subject Re: Displaying second page on click
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <8fb5739d-6013-432c-b881-fdd26406d61a@googlegroups.com>
Date 2017-07-24 15:41 +0200
Message-ID <XnsA7BC9FA3D4F21eejj99@194.109.6.166> (permalink)

Show all headers | View raw


bit-naughty@hotmail.com wrote on 24 Jul 2017 in comp.lang.javascript:

> Suppose I have a page with some text on it, and it has a "Next" button
> at the bottom. When that's clicked, it should show Page 2 of the
> text,.... BUT WITHOUT HITTING THE SERVER - Ajax or otherwise! That is to
> say, the text should show INSTANTANEOUSLY!! How do I do this?

Many ways, do you never seach the web?

[However, a computer being a state-machine, instantaneous is nonsense.]

For instance toggle div display CSS between none and block.

> Is one
> possible way, to keep all the text for page 2 in a DIV somewhere in the
> HTML, and then show it on click? But how do I keep that hidden until the
> click? And then show it? ...Is there some way to do this for multiple
> pages - page 3, and 4,.... and so on? 

Yes. Same way.

But please, 
first look on the web, 
these Q are asked and answered multiple times.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Displaying second page on click bit-naughty@hotmail.com - 2017-07-24 06:23 -0700
  Re: Displaying second page on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-07-24 15:41 +0200

csiph-web