when i was trying to play with the examples... the most of them including the screencast... dindt worked for me...
then I installed and try them into firefox, and netscape (i was using iexplorer 6)... and magic... all examples wroked. so the problem is.. Internet Eplorer??? please help QUESTION: why didnt the next worked correctly in internet explorer??? this example (http://trac.mochikit.com/wiki/HowtoSimpleAjax) it is supposed to load external files into a DIV element... i doesnt work in internet explorer (wxp sp2) the code just load the txt file into the wundow not the div.... cleaning all the contents IT is supposed only to load the external content into the DIV ------------------------- FILES: Make 3 files with any txt content with names: text1.txt , text2.txt , text3.txt , notthere.txt.... and this other two ones... ==================================================== FILE.HTM ------------------------------------------------------------------------------------------------------- <html> <head> <script type="text/javascript" src="/path/to/MochiKit.js"></script> <script type="text/javascript" src="myscript.js"></script> </head> <body> <ul> <li><a class="async" href="text1.txt">text 1</a></li> <li><a class="async" href="text2.txt">text 2</a></li> <li><a class="async" href="text3.txt">text 3</a></li> <li><a class="async" href="notthere.txt">not there</a></li> </ul> <div id="infotarget"> </div> </body> </html> ===================================================== myscript.js --------------------------------------------------------------------------------------------------------- var clicklink = function (url) { return function (evt) { // prevent the normal 'click' action for a link evt.stopPropagation(); evt.preventDefault(); var doReplace = function (req) { $('infotarget').innerHTML = req.responseText; }; var doReplaceError = function () { $('infotarget').innerHTML = 'Error!!!'; }; var res = MochiKit.Async.doSimpleXMLHttpRequest(url); res.addCallbacks(doReplace,doReplaceError); } }; var convertA = function (linkelement) { MochiKit.DOM.addToCallStack(linkelement,'onclick',clicklink(linkelement.href)); }; var initpage = function () { MochiKit.Base.map(convertA,MochiKit.DOM.getElementsByTagAndClassName('a','async')); }; MochiKit.DOM.addLoadEvent(initpage);
