Is it possible (and how) to load one page containing text with Ajax,
not show it to the user, but with javascript (or something) show
selected parts of that text within element on another page? In other
words: is it possible to use "dummy page" to store text that is only
partially going to be shown to user, and if so, are there any limits
to the amount of data that can be stored this way?
If this can't be done, are there any other ways of achieving the same
("local storage of text on client browser")?
And: Happy This Year! |
Request for Question Clarification by
andyt-ga
on
15 Jan 2006 15:59 PST
Hi hardtoinventgoodnick,
There are several ways to do this. You could either store text as
javascript variables, or put the text in a div, and mark the style of
that div = "display:none". The div would be invisible, but you could
get the text of the div, and update other elements with that text.
You could also load this text in an iframe, which would be invisible
to the user, but you could access text from it . Is this the sort of
answer you're looking for? If you prefer one method over the other I
could try to write some sample code using that method for you to use
as an answer.
-Andy
|
Clarification of Question by
hardtoinventgoodnick-ga
on
15 Jan 2006 22:44 PST
The main objective is to store as much of text as possible, so if
there is difference between different methods, that is interesting.
Also of interest is the upper limit of storage available in different
browsers.
|
Request for Question Clarification by
andyt-ga
on
16 Jan 2006 21:36 PST
One major component of ajax is requesting from the server text and
other content, and not caching the content as a dummy page. When the
text is requested, it can be updated on the page without a refresh.
This might be a better option for you, compared to storing tons of
content. Otherwise, in regards to limits there is no hard limit on
the amount of text in a hidden div or a hidden iframe. Probably at a
couple megabytes the browser would start performing very poorly.
Can I point you to some tutorials on getting text from the server
dynamically using a scripting language, or how to show and hide divs?
-Andy
|