View Full Version : "Readonly" <table> with FireFox


Rodie
07-22-2005, 09:32 PM
Hi everybody :)

I have a HTML page that contains an <iframe> called "myiframe".
In a javascript function, I write the code inside the <iframe> like this:
var startHTML = "<html>\n";
startHTML += "<head></head><body>\n";

startHTML += "<table>\n";
startHTML += "<tr><td>cellul";
startHTML += "</table></body></html>\n";

myiframe.document.open();
myiframe.document.write(startHTML);
myiframe.document.close();
OK, I obtain an iframe containing the table that I expected. But there is a problem with FireFox (not with Internet Explorer): if I click somewhere on the table, I can modify the table, like in Microsoft Office Word : its size, size of rows, columns ...

I don't want to be able to modify it. I want a "readonly" table.

Someone has an idea ??
Thanks a lot :lolol:

iTom
07-27-2005, 11:48 AM
Try adding a 'disabled' attibrute to your table.

Rodie
07-27-2005, 07:22 PM
Hi Thomas

"disabled" does not exist for <table>
Don't try to cheat :lolol:

Actually I solved my problem. I could edit the element inside the <iframe> (so the array among others) because I had copy-paste code from the Internet with this statement: designMode = on.

So ... I removed this line and everything went smoothly.
Thanks for your help.
Good luck :)

iTom
07-27-2005, 08:37 PM
Soz I thought it did.