Hi, I have a question regarding Dashboard Widget Programming with XMLHttpRequest. Please help me!? My code works fine in Safari but it doesn't in Dashboard widget. I just put extension .wdgt to the folder without changing any word of my code. I don't know why. Here is my code: function submitButtonClicked () {xml_req = false;xml_req = new XMLHttpRequest ();if (xml_req) {xml_req.onreadystatechange = processReqChange;xml_req.setRequestHeader ("Cache-Control", "no-cache");url = httpLink + "?regionType="+ regionType;xml_req.open ("GET", url , true);xml_req.send(null);}}function processReqChange (){if (xml_req.readyState == 4 ){if (xml_req.status == 200){var resultText = xml_req.responseText;}else {resultText = "Cannot get the result due to: " + xml_req.statusText;}outputDataDiv = document.getElementById ("outputDataDiv");outputDataDiv.innerHTML += resultText;}}In Safari, my outputDataDiv has the resultText, but in Widget I got status: "Cannot get the result due to: undefined".Please help!
__________________ I Love Yahoo! Answers |