473,394 Members | 1,641 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,394 software developers and data experts.

error in ready state

omerbutt
638 512MB
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_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://server/rageprojects/myrage/site/edit_account.php :: StateChangeA :: line 46" data: no]
Source File: http://server/rageprojects/myrage/site/edit_account.php
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 2144
acoder
16,027 Expert Mod 8TB
You probably need to check if readyState is 4 before you check the status.
Mar 25 '08 #2
omerbutt
638 512MB
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 Expert Mod 8TB
So it's working now?
Mar 25 '08 #4
omerbutt
638 512MB
So it's working now?
yeah perfectly buddy :)
Mar 25 '08 #5
acoder
16,027 Expert Mod 8TB
Glad to hear it. I did think based on your reply, but just making sure.
Mar 25 '08 #6
omerbutt
638 512MB
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
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: ...
0
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
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...
14
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...
0
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...
3
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...
1
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...
1
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,...
1
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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
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...

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.