Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > AJAX Callback with large amount of text

Reply
Thread Tools

AJAX Callback with large amount of text

 
 
eggie5@gmail.com
Guest
Posts: n/a
 
      09-28-2006
OK, so I'm trying to get a large amount of text back to my ASP script
on the server. My large amount of text is the source to a web page, and
I want to preserve the formatting on it, ie the indenting. Before any
of this the only way I got stuff back to the server is with query
strings. Now I'm pretty sure there's other ways to get data back to the
sever besides query stings but I'm having trouble finding them. Can
somebody point me in the right direction or tell me how?

 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      09-28-2006
Hi,

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> OK, so I'm trying to get a large amount of text back to my ASP script
> on the server. My large amount of text is the source to a web page, and
> I want to preserve the formatting on it, ie the indenting. Before any
> of this the only way I got stuff back to the server is with query
> strings. Now I'm pretty sure there's other ways to get data back to the
> sever besides query stings but I'm having trouble finding them. Can
> somebody point me in the right direction or tell me how?


You can use POST with XmlHttpRequest.

Greetings,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
 
Reply With Quote
 
 
 
 
handy
Guest
Posts: n/a
 
      09-28-2006
use "POST" method

 
Reply With Quote
 
Bruce Wisentaner
Guest
Posts: n/a
 
      09-29-2006
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> OK, so I'm trying to get a large amount of text back to my ASP script
> on the server. My large amount of text is the source to a web page, and
> I want to preserve the formatting on it, ie the indenting. Before any
> of this the only way I got stuff back to the server is with query
> strings. Now I'm pretty sure there's other ways to get data back to the
> sever besides query stings but I'm having trouble finding them. Can
> somebody point me in the right direction or tell me how?
>

As folk have said, use POST method, which probably involves you learning to
do this sort of thing:
var sendStr, field1='Some text', field2='some more text', reqxml = new
XMLHttpRequest();
reqxml.open("POST", "servercode.asp", true);
reqxml.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded") /* IMPORTANT */
sendStr = 'field1=' + encodeURIComponent(field1) + '&field2=' +
encodeURIComponent(field2);
reqxml.send(sendStr);

server ASP code access request.form("field1"), request.form("field2")

---good luck
---Bruce Wisentaner




 
Reply With Quote
 
eggie5@gmail.com
Guest
Posts: n/a
 
      10-06-2006
Thanks, I'm doing this now with prototype and it works great!


Laurent Bugnion wrote:
> Hi,
>
> (E-Mail Removed) wrote:
> > OK, so I'm trying to get a large amount of text back to my ASP script
> > on the server. My large amount of text is the source to a web page, and
> > I want to preserve the formatting on it, ie the indenting. Before any
> > of this the only way I got stuff back to the server is with query
> > strings. Now I'm pretty sure there's other ways to get data back to the
> > sever besides query stings but I'm having trouble finding them. Can
> > somebody point me in the right direction or tell me how?

>
> You can use POST with XmlHttpRequest.
>
> Greetings,
> Laurent
> --
> Laurent Bugnion, GalaSoft
> Software engineering: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Webservices returning large amount of data - need suggestions DarthLuch@gmail.com Java 2 05-03-2006 11:01 PM
How to store a large amount of 3D data points in Java? James Java 29 04-15-2006 04:19 AM
use servlet to generate image for large amount of request autogoor@yahoo.com Java 0 07-07-2005 04:21 PM
Need a large amount of memory! Thomas Pototschnig Java 1 04-30-2005 05:37 PM
Backing Up Large Files..Or A Large Amount Of Files Scott D. Weber For Unuathorized Thoughts Inc. Computer Support 1 09-19-2003 07:28 PM



Advertisments