Put the function callback above the reference to ajaxframework.js. If that doesn't work, then can you please post the source to that JS file so we can see more.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Put the function callback above the reference to ajaxframework.js. If that doesn't work, then can you please post the source to that JS file so we can see more.
Thank you for your reply.
I put the reference under and got blank page. The code of ajaxframework.js is as below:
Code:
function readXmlWithGet(urlToCall, functionToCallback)
{
var XMLHttpRequestObj = false;
if (window.XMLHttpRequest)
{
XMLHttpRequestObj = new XMLHttpRequest();
}
else if (window.ActiveObject)
{
XMLHttpRequestObj = new ActiveObject('Microsoft.XMLHTTP');
}
if (XMLHttpRequestObj)
{
XMLHttpRequestObj.open('GET', urlToCall);
XMLHttpRequestObj.onreadystatechange = function()
{
if (XMLHttpRequestObj.readyState == 4 && XMLHttpRequestObj.status == 200)
{
functionToCallback(XMLHttpRequestObj.responseXML);
delete XMLHttpRequestObj;
XMLHttpRequestObj = null;
}
}
XMLHttpRequestObj.send(null);
}
}
I see it now. <script> must have an end tag not an end slash. This would also explain the blank page when you changed them around. It would recognize the following text as part of the script and not HTML. Change...
I have another question, which is how I can debug javascript in Visual Studio 2005. I set breakpoint but IDE says that this breakpoint will not currently be hit.
Well, I personally like the Error Console in Firefox. I don't work much with Visual Studio 2005. To debug in that, you need to do a multi-step process.
1. Open Control Panel.
2. Open Internet Options.
3. Select the Advanced tab.
4. Uncheck both boxes that say "Disable script debugging".
5. Go to Visual Studio 2005.
6. Click on the Debug menu.
7. Select Windows.
8. Choose Script Explorer. (CTRL-ALT-N)
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Bookmarks