You are not logged in.
I am editing full pages with Xinha. Ok, everything is allright, but in IE, the elements that have some javascript event, like onclick, onmouseover, ... are still enabled (it works, generating an error...).
Somebody knows the solution? that is a bug?
Thanks for any help
Offline
Ray, where are you? help!
Offline
http://xinha.python-hosting.com/ticket/988
Here you are
Offline
Hi Ray
I was not talking about the Xinha events, but the events inside the edited document.
If in my doc I have a menu with items like this:
<div ... onmouseover="chClass(1)" onmouseout="chClass(2)">
when editing in WYSIWYG mode this event will be working, and chClass() will be called, generating an error.
------------------------------
I hope it is more clear now...
Thank you, Cau
Offline
I had found that to prevent onLoad events occurring, I had to replace "onLoad" with "onPlaceholder" when loading the document, and then switch it back to "onLoad" when saving. Maybe this idea would work here as well. "onmouseout" could be temporarily replaced with "onmouseplaceholderout," potentially.
Offline
this is just what happens (similarly) as of revision 793. Actually a check is inserted in the js of the event that checks if inside the Xinha iframe and then returns false. This happens transparently in inwardHtml()/outwardHtml(), so that you won't be bothered in sourceview
Offline
Ray, i'm sorry... only now i understood.
But i made the changes specified in changeset (http://xinha.python-hosting.com/changeset/793), that affect inwardHtml, but the problem was there anyway. So I put an alert to see the HTML and I discovered that this function is not called when editor is loaded. I think we have to put it before to show the edited document to the user...
Well, before your response, i used this php functions, that modify the HTML replacing the event names before load in Xinha, and undoes that after Xinha edition (it worked well):
function disableEvents($html) {
$ever = "/(on(mouse(over|out|up|down|move)|click|dblclick|(un)?load|".
"select|focus|blur|key(press|up|down)))(\s*=\s*)/i";
return preg_replace($ever, "_"."$1=", $html, -1);
}
function enableEvents($html) {
$dever = "/_(on(mouse(over|out|up|down|move)|click|dblclick|(un)?load|".
"select|focus|blur|key(press|up|down)))(\s*=\s*)/i";
return preg_replace($dever, "$1=", $html, -1);
}
-> onmouseover - _onmouseover; onclick - _onclick; etc...
Last edited by caugb (2007-03-23 07:46:09)
Offline