Click here to Skip to main content
15,915,319 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Strange Problem Pin
Guffa11-Sep-07 2:25
Guffa11-Sep-07 2:25 
QuestionURGENT HELP Pin
Azi Qaiser11-Sep-07 16:47
Azi Qaiser11-Sep-07 16:47 
AnswerRe: URGENT HELP Pin
Guffa11-Sep-07 21:42
Guffa11-Sep-07 21:42 
GeneralRe: URGENT HELP Pin
Azi Qaiser12-Sep-07 18:34
Azi Qaiser12-Sep-07 18:34 
AnswerRe: URGENT HELP Pin
Guffa12-Sep-07 22:44
Guffa12-Sep-07 22:44 
QuestionPlacing flowplayer.swf in different folder than flv files folder [modified] Pin
harryforum9-Sep-07 20:45
harryforum9-Sep-07 20:45 
Questionmedia clips o0n web page Pin
raj4ranjit9-Sep-07 20:24
raj4ranjit9-Sep-07 20:24 
QuestionXMLHTTPRequest in FF [modified] Pin
JimmyRopes9-Sep-07 8:48
professionalJimmyRopes9-Sep-07 8:48 
I have an AJAX script that dynamically updates a database and returns some value to be used to update a control on an HTML page.

It works fine in IE (ActiveX) and Opera (native XMLHTTPRequest) but not in FF. I can see the database being updated so I know that the server side script (php) is executing even from FF but I do not get any request state posted to the assigned Req.onreadystatechange() handler.

I put an alert in the state change handler to see the states being returned and see them on IE and Opera but do not see any activity on FF. The database is updated so I know the request is firing but just not getting a return on FF.

Does anyone know why this is happening?

-- modified at 17:37 Sunday 9th September, 2007

I installed Firebug as suggested and now I am really confused.

According to Firebug the transaction is executing properly and I am receiving the proper response.

There are no errors apparent (I am not quite sure what I am looking for) and the transaction returns the expected data. I tried a few different posts and each returned the proper data for the parms I passed.

The only problem is that I never receive a state change in the assigned state change handler so I don't know when the transaction completes.

At least I now know the transaction is completing properly.

Would anyone have any insight into why the state change handler is not getting signaled on FF when it is getting signaled on IE and Opera? Confused | :confused:

I am using the following code. It would be greatly appreciated if anyone can spot where I am going wrong.

<br />
var HTTPREQUEST_UNINITIALIZED = 0;<br />
var HTTPREQUEST_LOADING       = 1;<br />
var HTTPREQUEST_LOADED        = 2;<br />
var HTTPREQUEST_INTERACTIVE   = 3;<br />
var HTTPREQUEST_COMPLETED     = 4;<br />
var HTTPREQUEST_SUCCESS       = 200;<br />
<br />
  //-----------------------------------------------------------------------------<br />
  // Define and initialize an HttpRequest object for posting data.<br />
  //-----------------------------------------------------------------------------<br />
   Request = new getXMLHttpRequest();<br />
   Request.onreadystatechange = StateChangeHandler;<br />
   var data = '';<br />
   <br />
  Request.abort();<br />
	var path = "<?php echo $_ENV['SCRIPT_URI']; ?>";<br />
	path = path.substring(0, path.lastIndexOf('/') + 1) + "getHood.php";<br />
  Request.open("post", path, true);<br />
  Request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");<br />
  data = "City=" + city<br />
  + "&State=" + state;<br />
  Request.send(data);<br />
} // function getHood()<br />
<br />
function StateChangeHandler(){<br />
//alert('StateChangeHandler()'+ ' ' + Request.readyState);<br />
 if (HTTPREQUEST_COMPLETED == Request.readyState){<br />
   if (HTTPREQUEST_SUCCESS == Request.status){<br />
~~~~~~~~~~~~~~ Code here to handle the response ~~~~~~~~~~~~~~~~~~~~~~~<br />
   }	// if (HTTPREQUEST_SUCCESS == Request.status)<br />
   else{<br />
      alert("Error: HTTP "<br />
       + Request.status<br />
       + " "<br />
       + Request.statusText<br />
       + " Please contact our WebMaster from the link on our Contact Us page explaining the error you received.  Thank you.");<br />
   }	// else [if (HTTPREQUEST_SUCCESS == Request.status)]<br />
 }	// if (HTTPREQUEST_COMPLETED == Request.readyState)<br />
}	// function StateChangeHandler()<br />
<br />


Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes


AnswerRe: XMLHTTPRequest in FF Pin
Christian Graus9-Sep-07 9:38
protectorChristian Graus9-Sep-07 9:38 
GeneralRe: XMLHTTPRequest in FF Pin
JimmyRopes9-Sep-07 11:03
professionalJimmyRopes9-Sep-07 11:03 
GeneralRe: XMLHTTPRequest in FF Pin
Ed.Poore9-Sep-07 11:14
Ed.Poore9-Sep-07 11:14 
GeneralRe: XMLHTTPRequest in FF Pin
JimmyRopes9-Sep-07 11:36
professionalJimmyRopes9-Sep-07 11:36 
GeneralRe: XMLHTTPRequest in FF Pin
Ed.Poore9-Sep-07 11:42
Ed.Poore9-Sep-07 11:42 
GeneralRe: XMLHTTPRequest in FF Pin
JimmyRopes9-Sep-07 11:57
professionalJimmyRopes9-Sep-07 11:57 
GeneralRe: XMLHTTPRequest in FF Pin
Ed.Poore9-Sep-07 13:44
Ed.Poore9-Sep-07 13:44 
GeneralRe: XMLHTTPRequest in FF Pin
JimmyRopes9-Sep-07 18:51
professionalJimmyRopes9-Sep-07 18:51 
GeneralRe: XMLHTTPRequest in FF Pin
Shog99-Sep-07 20:46
sitebuilderShog99-Sep-07 20:46 
GeneralRe: XMLHTTPRequest in FF Pin
JimmyRopes10-Sep-07 3:15
professionalJimmyRopes10-Sep-07 3:15 
QuestionRepresentation of Polling Results in a Graph Pin
Dua Rehmaan8-Sep-07 18:42
Dua Rehmaan8-Sep-07 18:42 
AnswerRe: Representation of Polling Results in a Graph Pin
Christian Graus9-Sep-07 2:37
protectorChristian Graus9-Sep-07 2:37 
Questionjavascript submit form Pin
Eli Nurman8-Sep-07 15:58
Eli Nurman8-Sep-07 15:58 
AnswerRe: javascript submit form Pin
Chetan Patel9-Sep-07 21:31
Chetan Patel9-Sep-07 21:31 
GeneralRe: javascript submit form Pin
Eli Nurman9-Sep-07 21:39
Eli Nurman9-Sep-07 21:39 
QuestionHow to place a image over the HTML button..? Pin
Balagurunathan S7-Sep-07 20:46
Balagurunathan S7-Sep-07 20:46 
AnswerRe: How to place a image over the HTML button..? Pin
Guffa8-Sep-07 2:17
Guffa8-Sep-07 2:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.