Google Answers Logo
View Question
 
Q: Using "dummy page" to store text with Ajax ( No Answer,   2 Comments )
Question  
Subject: Using "dummy page" to store text with Ajax
Category: Computers > Programming
Asked by: hardtoinventgoodnick-ga
List Price: $50.00
Posted: 02 Jan 2006 08:32 PST
Expires: 01 Feb 2006 08:32 PST
Question ID: 427993
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
Answer  
There is no answer at this time.

Comments  
Subject: Re: Using "dummy page" to store text with Ajax
From: winista-ga on 10 Jan 2006 11:42 PST
 
Not possible. No browser gives access to user's file system. Your
dummay file will be saved in temp or cache folder used by browser and
you will not know what name it will assign to file and where it is
going to copy it.

What exactly you want to accomplish by this? There may be some other way to do that.
Subject: Re: Using "dummy page" to store text with Ajax
From: hardtoinventgoodnick-ga on 10 Jan 2006 23:58 PST
 
I would like to store as much text as possible for using it based on
user input without need to fetch more text over the network. Are
Javascript variables the only place I can use?

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy