Skip to main content

jmaki.doAjax usage

2 replies [Last post]
Joined: 2008-03-19

Hi guys,
I wrote what I thought to be very straightforward and simple code to load a local xml file using xmlhttprequest, but I never get to the callback. Is there something obvious that I'm missing?

_url = "TEST-NOTICES.xml";
jmaki.doAjax({method: "GET",
url: _url,
callback: function(_req) {
someVariable = _req.responseText;

If my php and xml files are in the same directory, shouldn't that path work? In Firebug, I don't see a GET request... so I am assuming that no request was ever made. Does anyone have recommendations on how to debug this?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-07-07

I was able to produce this simple JSP page. You will need to convert it to PHP. However, it works fine. I am posting the HTML code below along with XML file I used for the page. Maybe it will lead you in the correct direction. Notice that I have included the jmaki.js file in my page as this is the scope in which the jmaki.doAjax function is defined. It is not enough to include the jsp specific tag handler. (as I previously said, you will need to convert this to php technology as I do not use it).

jsp page:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

    JSP Page



JSP Page






Joined: 2008-03-19

Thanks Baikarium. I finally saw my simple mistake!