W
whmoseley
I'm using the Prototype library for ajax calls. (Yes, I'm aware of the
discussions about prototype lately). Perhpas it's the library that's
causing problems, but I'm more suspct of my own code at this point in
my javascript learning curve.
Here's the test page with inlined javascript:
http://hank.org/demos/ajax3.html
Works in Firefox and Opera. Safari sees the onclick events, but then
runs the default action (follows the link). IE doesn't run the event
handler at all, although as seen with the alerts, it's running the code
to set the events.
The inital goal was to separate the html from the javascript -- that
is, avoid using inline onclick events in the html.
The code is suppose to find all elements with class "ajaxtarget" --
that is the container that is replace by the ajax call. The events to
set are then found by looking for class="ajax" within that outer
target.
Upon an oclick event (before making the ajax call) the code removes the
events. From what I've read that's needed to keep IE from leaking
memory. After the DOM is updated the process of adding the onclick
events is repeated to reset the events.
At this point I'm looking for help to get the code working, if
possible, with IE and Safari.
Thanks,
discussions about prototype lately). Perhpas it's the library that's
causing problems, but I'm more suspct of my own code at this point in
my javascript learning curve.
Here's the test page with inlined javascript:
http://hank.org/demos/ajax3.html
Works in Firefox and Opera. Safari sees the onclick events, but then
runs the default action (follows the link). IE doesn't run the event
handler at all, although as seen with the alerts, it's running the code
to set the events.
The inital goal was to separate the html from the javascript -- that
is, avoid using inline onclick events in the html.
The code is suppose to find all elements with class "ajaxtarget" --
that is the container that is replace by the ajax call. The events to
set are then found by looking for class="ajax" within that outer
target.
Upon an oclick event (before making the ajax call) the code removes the
events. From what I've read that's needed to keep IE from leaking
memory. After the DOM is updated the process of adding the onclick
events is repeated to reset the events.
At this point I'm looking for help to get the code working, if
possible, with IE and Safari.
Thanks,