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

Web Development

 
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 
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 
Ed.Poore wrote:
have you spelt the handler wrong


If I did it wouldn't work in IE and Opera. I am not saying that I am above doing something like this but unless I unknowingly have the clairvoyant versions of IE and Opera I would expect them to choke also.

Here is the code. Let me know if you can spot anything.

<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


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 
AnswerRe: How to place a image over the HTML button..? Pin
saadani8-Sep-07 13:14
saadani8-Sep-07 13:14 
AnswerRe: How to place a image over the HTML button..? Pin
brucedkyle9-Sep-07 11:22
brucedkyle9-Sep-07 11:22 
QuestionWebkit-Saved html files rendering on safari Pin
roshetty7-Sep-07 10:08
roshetty7-Sep-07 10:08 
QuestionVisual Studio on Production Server Pin
John Held7-Sep-07 7:44
John Held7-Sep-07 7:44 
AnswerRe: Visual Studio on Production Server Pin
Manuel F. Hernandez7-Sep-07 8:09
Manuel F. Hernandez7-Sep-07 8:09 
GeneralRe: Visual Studio on Production Server Pin
John Held10-Sep-07 2:30
John Held10-Sep-07 2:30 

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.