473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

AJAX Callback with large amount of text

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?

Sep 28 '06 #1
4 2284
Hi,

eg****@gmail.com 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
Sep 28 '06 #2
use "POST" method

Sep 28 '06 #3
<eg****@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro 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


Sep 29 '06 #4
Thanks, I'm doing this now with prototype and it works great!
Laurent Bugnion wrote:
Hi,

eg****@gmail.com 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
Oct 6 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: Larry | last post by:
Hi there: I have seen numerous postings about eval() and its evils on this forum. However, one of our developers is using it in the following way, which seems like a great use of it. Page...
5
by: geekboy0001 | last post by:
Just trying to get some opinions out there... There are tons of Ajax libraries out there... Ajax.NET Professional, ComfortASP.NET, ZumiPage, etc. etc... Microsoft has their own too, Atlas. I've...
6
by: petermichaux | last post by:
Hi, Reading the Yahoo! UI AJAX library, there is a unique workaround for an apparent IE 6 memory leak with binding a function to onreadystatechange. Instead of binding a function to...
12
cassbiz
by: cassbiz | last post by:
I downloaded this calendar off the web and am trying have it show twice, once as calendar.php and the second time as calendar1.php I need the visitor to be able to select a beginning date and an...
0
by: john_c | last post by:
Sometimes I get this error in an aspx page: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/in configuration or <%@ Page...
3
by: =?Utf-8?B?bWNpbWFnaW5n?= | last post by:
We have recently applied AJAX to our web site, nothing particularly fancy, just some update panel, progress images and collapsible panels, just the basics to improve the user experience. The...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
1
by: Joey | last post by:
Hey guys, here's what I have... To help manage browser windows with session state on the server, I have some javascript code in one of my master pages that gets planted into most (content) pages...
4
by: KDawg44 | last post by:
Hi, I have a feeling this is a dumb question, but I am exploring AJAX and PHP. I would like to write my PHP in an Object Oriented approach. What is the limitation on what I can return in AJAX? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.