Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16273
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How do we overcome deficiency of ajax? |
| Date | 2012-09-30 13:23 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <k49h51$3db$3@dont-email.me> (permalink) |
| References | <089d9dbc-a959-451d-9222-72b4fd93f080@h4g2000yqk.googlegroups.com> |
On Sat, 29 Sep 2012 18:43:39 -0700, justaguy wrote: > <div id="John"> > <p> > John Doe is embarking on an ambitious plan. We don't know where he'll > be able to go from here. > </p> > > <p> > And yet one thing is for sure, history is never a friend of cowards. Not > that John Doe is reckless... > </p> > </div> > Now, if we do an ajax call via GET method to pass the data to a web > server, the XML data would not retain the formatting attributes such as > the P tags. Many may have asked this question before, is there an > elegant solution to this issue? That is, to retain the formatting of a > block of text while passing data along. If you do an ajax call using the GET method, the server receives whatever data you put in the get request, formatted however you want to format it, within the constraint that you need to use certain substitutions for certain non alphanumeric characters. However, your basic premise appears nonsensical to me - why on earth would you want to send back to the server in an ajax request the x/html markup that the server had sent to you in the first place? Normally when you send an ajax request to the server, it's because your javascript wants to change something on the page in response to some user input or action, in which case there's no point whatsoever sending back static content that came from the server in the first place. If perhaps you're telling a story in blocks of text, and sending the next page each time, then you only need to send the next page number in the get request, not the content of the current page of the book. Rgds Denis McMahon
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do we overcome deficiency of ajax? justaguy <lichunshen84@gmail.com> - 2012-09-29 18:43 -0700
Re: How do we overcome deficiency of ajax? Denis McMahon <denismfmcmahon@gmail.com> - 2012-09-30 13:23 +0000
Re: How do we overcome deficiency of ajax? justaguy <lichunshen84@gmail.com> - 2012-09-30 12:25 -0700
csiph-web