By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Ajax/.Net 1.1 readyState problem

P: 1
The code below is working to a point. At the http_request.readyState statement I get a state of one. How do I complete the process so I can get a state of four and/or another means of getting a value back to the page?

server-side C#
private void Page_Load(object sender, System.EventArgs e){
string[] token=new StreamReader(Request.InputStream).ReadToEnd().Spli t('^');

public void ajax_post(string[] token){
string page=token[1];
XmlDocument doc=new XmlDocument();
XmlNode answer_node=doc.DocumentElement.SelectSingleNode(" page[@id="+page+"]/answers");

client-side javascript
function create_ajax_object(){
http_request=new XMLHttpRequest();
}else if(window.ActiveXObject){
http_request = new ActiveXObject("Msxml2.XMLHTTP");
http_request = new ActiveXObject("Microsoft.XMLHTTP");
if(!http_request) {
alert('Cannot create XMLHTTP instance');
return false;

function save_page(type){
http_request.send(xml_file+"^"+ current_page +"^next^1~2~3~4");

xml file
<?xml version="1.0"?>
<page id="1">
<page id="2">
<page id="3">
<page id="4">
<page id="5">
<page id="6">
Apr 25 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.