niroshan
06-19-2003, 12:09 AM
Hi Everyone,
I have a page which uses the iframe that users can type in the browser when the page is loaded.when the user ends what he wants to type he has to click the 'finish' button and it will write everything in to a file.
Up to now i can get the user inputs but what i can not do is when the user clicks the 'finish' button, i want to disable the iframe so he can not write anything there anymore.
i give you my coding for better undestanding,
<html>
<head>
<title>Untitled Document</title>
</head>
<script language="JavaScript">
window.onload = doLoad
window.onerror = stopError
function aa()
{
foo.document.designMode = 'Off';
}
function stopError()
{
return true;
}
function doLoad()
{
foo.document.designMode = 'On';
foo.focus()
}
</script>
<body>
<table class=iframe height=100% width=100%>
<tr height=100%>
<td><iFrame SECURITY="restricted" contenteditable HEIGHT=100% id="foo" style="width:100%;"></iFrame>
<input type="hidden" name="ew_control_html" value=""> </td>
</tr>
<tr height=100%>
<td> <input type="button" name="ss" onClick="aa()"></td>
</tr>
</table>
</body>
</html>
here what i have done is i have made the design mode of my iframe to 'OFF'. this works fine but this will hide the contents which the user has typed. when the design mode is off he no longer can view the contents he wrote before.
but what i want is to disable the content editing and view the contents he typed.
any ideas about a solution for this problem is greatly appreciated.
thankx in advance,
regards,
Niroshan
I have a page which uses the iframe that users can type in the browser when the page is loaded.when the user ends what he wants to type he has to click the 'finish' button and it will write everything in to a file.
Up to now i can get the user inputs but what i can not do is when the user clicks the 'finish' button, i want to disable the iframe so he can not write anything there anymore.
i give you my coding for better undestanding,
<html>
<head>
<title>Untitled Document</title>
</head>
<script language="JavaScript">
window.onload = doLoad
window.onerror = stopError
function aa()
{
foo.document.designMode = 'Off';
}
function stopError()
{
return true;
}
function doLoad()
{
foo.document.designMode = 'On';
foo.focus()
}
</script>
<body>
<table class=iframe height=100% width=100%>
<tr height=100%>
<td><iFrame SECURITY="restricted" contenteditable HEIGHT=100% id="foo" style="width:100%;"></iFrame>
<input type="hidden" name="ew_control_html" value=""> </td>
</tr>
<tr height=100%>
<td> <input type="button" name="ss" onClick="aa()"></td>
</tr>
</table>
</body>
</html>
here what i have done is i have made the design mode of my iframe to 'OFF'. this works fine but this will hide the contents which the user has typed. when the design mode is off he no longer can view the contents he wrote before.
but what i want is to disable the content editing and view the contents he typed.
any ideas about a solution for this problem is greatly appreciated.
thankx in advance,
regards,
Niroshan