:
This message was edited by MarkOh at 2002-10-29 0:58:46
: I'am working on a wysiwyg editor and i would like to catch the mouse-buttons that are pressed inside the iframe
: so i can make my own context menu. All works fine but as soon as i put the designmode on the javascript function
: for the clicks doesn't work anymore.
:
: here's the code
:
: <%=nameFrame%>.focus();
: <%=nameFrame%>.isHTMLMode = false;
:
: <%=nameFrame%>.document.write('<HTML><HEAD><title>asdfs</title><script language=JavaScript>
: var message="Function Disabled!"; function click(){ if (event.button==2){ alert(message); return false; }}
: document.onmousedown=click; <'+'/script></HEAD><BODY><link REL="stylesheet" href="'+styleCSS+'" TYPE="text/css"><%=data%></BODY></HTML>');
:
: <%=nameFrame%>.document.designMode="On";
: <%=nameFrame%>.focus();
:
:
: If i leave the designmode="On" away and i press the right mouse button
: i get the message, but as soon as i put it back in my code it won't
: work anymore.
:
: What am i doing wrong
:
:
:
Hi,
At first look all seems alright, but first thing that comes to my mind is that JavaScript didn't support multi lines strings. What this means:
var a="string line1
string line2
string line3";
will be incorrect expression and must be:
var a="string line1\nstring line2\nstring line3";