473,796 Members | 2,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error in ready state

omerbutt
638 Contributor
hi there i am getting error in the statechange function .I am using html,ajax,php and mysql,it was running smooth and at once it started giving error here is the code
Expand|Select|Wrap|Line Numbers
  1. function prof_info(fobj){
  2.         var vld_inp=Get_Prof_Info(fobj,"validate");
  3.         xmlHttp=GetXmlHttpObject();
  4.         if(xmlHttp!=null){
  5.             xmlHttp.onreadystatechange=StateChangeA;
  6.             xmlHttp.open("POST","prof_save.php",true);
  7.             xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
  8.             xmlHttp.send(vld_inp);
  9.         }
  10.         else{
  11.             alert("your browser is not supported Please Upgrade it ");
  12.             return false;
  13.         }
  14.     }
  15.     function StateChangeA(){
  16.         alert("ready");
  17.         if(xmlHttp.status == 200){
  18.             if(xmlHttp.readyState == 4){
  19.                 var str="";
  20.                 str=xmlHttp.responseText;
  21.             }
  22.         }
  23.     }
  24.  
the error code that i am getting is here

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_A VAILABLE) [nsIXMLHttpReque st.status]" nsresult: "0x80040111 (NS_ERROR_NOT_A VAILABLE)" location: "JS frame :: http://server/rageprojects/myrage/site/edit_account.ph p :: StateChangeA :: line 46" data: no]
Source File: http://server/rageprojects/myrage/site/edit_account.ph p
Line: 46

the error is on the line where i have the if (xmlHttp.status == 200)
where as the php file from which it is getting the response is here
Expand|Select|Wrap|Line Numbers
  1. include("config.php");
  2.     $firstname=$_POST["member_first_name"];
  3.     $lastname=$_POST["member_last_name"];
  4.     $email=$_POST["member_email"];
  5.     $country=$_POST["members_country"];
  6.     $city=$_POST["member_city"];
  7.     $url=$_POST["member_url"];
  8.     $memberaim=$_POST["member_Aim"];
  9.     $mem_aboutme=$_POST["member_aboutme"];
  10.     $mem_male=$_POST["member_male"];
  11.     $mem_fmale=$_POST["member_female"];
  12.     $mem_tel=$_POST["member_n_tel"];
  13.     $mem_show_age=$_POST["show"];
  14.     $mem_nshow_age=$_POST["n_show"];
  15.     echo $firstname;
  16.  
Mar 25 '08 #1
6 2164
acoder
16,027 Recognized Expert Moderator MVP
You probably need to check if readyState is 4 before you check the status.
Mar 25 '08 #2
omerbutt
638 Contributor
You probably need to check if readyState is 4 before you check the status.
yeah i noticed that thing when i posted my question and fixed it ,thanks for the help anyways :)
reagrds,
omer
Mar 25 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
So it's working now?
Mar 25 '08 #4
omerbutt
638 Contributor
So it's working now?
yeah perfectly buddy :)
Mar 25 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
Glad to hear it. I did think based on your reply, but just making sure.
Mar 25 '08 #6
omerbutt
638 Contributor
Glad to hear it. I did think based on your reply, but just making sure.
:) thanks a lot for the concern man
regards,
omer.
Mar 26 '08 #7

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

Similar topics

11
7595
by: David Berry | last post by:
Hi All. I have a SQL Statement on an ASP page that only returns 4 records. When I run it in SQL Server or Query Analyzer it runs in less than a second. When I run it from my ASP page I get: Microsoft OLE DB Provider for SQL Server error '80040e31' Timeout expired the error line points to the rs.Open sql,con line. The SQL Statement is:
0
3048
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
12
6697
by: Christian Christmann | last post by:
Hi, assert and error handling can be used for similar purposes. When should one use assert instead of try/catch and in which cases the error handling is preferable? I've read somewhere that assert could be used to start an interactive debugger automatically. How do I realize that on a Linux machine using gcc?
14
10145
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought I should give back to the community by posting our findings. Thanks you all for all your help till now by posting problems and their solutions. ~Abhijit
0
3846
by: Mike Grishaber | last post by:
Hello All, I am using an IHttpAsyncHandler class to intercept HTTP Requests and forward them to a system which processes the Request and returns the Result. I use .NET Remoting to connect the IHttpAsyncHandler object to the System and transfer the Request and Result between the two. This works fine for quite a while, and then I start to get the following error. "This remoting proxy has no channel sink which means either the server has
3
1770
by: Just Me | last post by:
In code I check to see if the Floppy drive is ready and display it's state. But if the user inserts or removes a floppy disk I need an event or a Wndproc message to cause the code to display the new state. Is the some way the code can be alerted to the fact that a removable disk drive's state changed? I wonder if the above isn't clear.
1
6325
by: Sammy | last post by:
Can anyone please explain me the cause and resolution of this error. TIA Sammy Server Error in '/' Application. The device is not ready. Description: An unhandled exception occurred during the execution of the current web request. Please review the
1
1790
by: Eric | last post by:
When I run my script it gives error on the following line: strEmail = Right(strEmail, (Len(strEmail) - 1)) I enclose my code and the sample text file too Thanks, ----------------------------------------------------------------------------- Option Compare Database Option Explicit Private Sub Command26_Click()
1
4069
by: yasoof0wnz | last post by:
I tried a lot of things to fix this statement but every time i try fixing it, i get more errors, so i undo. Heres the error: fatal error C1075: end of file found before the left brace '{' at 'c:\users\yousif\desktop\maplestory\maplestoryserver\mapleisland.cpp(174)' was matched Heres the statement: void NPCsScripts::npc_9101001(NPC* npc){ int state = npc->getState(); if(state == 0){ npc->addText("You have finished all your trainings....
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.