A
AaronNGray
Hi,
I have created a minimized DesignMode test, that works accross all the
main browsers AFAICT and on IE5, 6, 7, and 8.
I have two problems on IE :-
- the first is IE insists on putting a borderframe on the iframe
window, even though I have fameborder set to "no".
- second, is focus, IE does not give the iframe focus until the mouse
cursor goes over the window.
Here's my code :-
http://www.aarongray.org/comp.lang.javascript/DesignMode/Edit.html
~~~~
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script>
window.onload = Init;
function Init() {
var f = document.createElement("iframe");
f.id = "editableiframe";
f.className = "editable";
f.style.border = "solid 1px black"
f.frameborder = "no";
f.setAttribute("frameborder", "no");
document.body.appendChild(f);
f.contentWindow.document.open();
f.contentWindow.document.write("<html><body>tester</body></html>");
f.contentWindow.document.close();
f.contentWindow.document.designMode = "on";
f.contentWindow.focus();
}
</script>
</head>
<body>
</body>
</html>
~~~~
Many thanks in advance,
Aaron
I have created a minimized DesignMode test, that works accross all the
main browsers AFAICT and on IE5, 6, 7, and 8.
I have two problems on IE :-
- the first is IE insists on putting a borderframe on the iframe
window, even though I have fameborder set to "no".
- second, is focus, IE does not give the iframe focus until the mouse
cursor goes over the window.
Here's my code :-
http://www.aarongray.org/comp.lang.javascript/DesignMode/Edit.html
~~~~
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script>
window.onload = Init;
function Init() {
var f = document.createElement("iframe");
f.id = "editableiframe";
f.className = "editable";
f.style.border = "solid 1px black"
f.frameborder = "no";
f.setAttribute("frameborder", "no");
document.body.appendChild(f);
f.contentWindow.document.open();
f.contentWindow.document.write("<html><body>tester</body></html>");
f.contentWindow.document.close();
f.contentWindow.document.designMode = "on";
f.contentWindow.focus();
}
</script>
</head>
<body>
</body>
</html>
~~~~
Many thanks in advance,
Aaron