First of all, I am an inexperienced javascript programmer (so you're
forewarned) and appreciate any help with the following problem.  I
have googled this every which way but can't find anything relevant.

I am using the current trunk of Mochikit.

I have a simple Web application that lists items and I am using AJAX
to display a detailed note on a particular item if the user requests
it.  The application works as expected for IE and Firefox but does not
work on Safari (version 3.0.4 running on Leopard).

When the user requests a note on an item, the following javascript
function is executed:

function show_note(obj)
{
    var id = obj.parentNode.id;
    var res = doSimpleXMLHttpRequest('get_note/'+id);
    res.addCallback(show_note_response);
}

and show_note_response looks like:

function show_note_response(res)
{
    var response = res.responseXML.documentElement;
    var id = response.getElementsByTagName('id')[0].firstChild.data;
    var p = response.getElementsByTagName('p')[0];

    var note_div = DIV({'id':id+'d','class':'note'},p)
    appendChildNodes(id, note_div);       //id is the id of the item
that was clicked on
}

When using Safari (or IE or Firefox), I can see the server receive the
'get_note' request and I can see the server respond with something
like:

<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><response><id>627</id><p
xmlns="http://www.w3.org/1999/xhtml";>Some text ...</p></response>

When using IE and Firefox the note displays below the item as expected
but on Safari nothing happens and I am not sure what the problem is or
how to debug it.  Thanks for any suggestions.

Steve

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to