Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table "readonly" on FireFox

Status
Not open for further replies.

Rodie

Programmer
Jun 27, 2004
132
FR
Hi everybody [pipe]

I have a HTML page that contains an <iframe> called "myiframe".
In a javascript function, I write the code inside the <iframe> like this:
Code:
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 [peace]
 
I suggest you adjust your code to output valid HTML in the first instance. You need to close the cell table and row (</td></tr>). That's the only thing I can think of in this instance!

Jeff


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Unfortunately, it does not work with </TD></TR> ...
Anyway, thanks a lot to you.
 
Do you mean that the following doesn't work?

Code:
var startHTML = "<html>\n";
startHTML += "<head></head><body>\n";

startHTML += "<table>\n";
startHTML += "<tr><td>cellul[COLOR=red]</td></tr>[/color]";
startHTML += "</table></body></html>\n";

myiframe.document.open();
myiframe.document.write(startHTML);
myiframe.document.close();

If not then there is something really wrong here.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Hi Foamcow

No, I don't your previous piece of code does not work at all. But it does not solve my original problem:

"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."

Thanks if you know :)
 
OK... so... what you are experiencing is not the kind of thing I would expect from a usual installation of Firefox - especially using the code you have posted.

I can only guess that what you are experiencing is as the result of you using some kind of fancy "WYSIWIG" Firefox plug-in or development plug-in.

Select the "Tools" menu (in Firefox) and then "Extensions". That shows you the full list of extensions you have installed. It may be one of them.

Cheers,
Jeff


[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Either that or it's not an iFrame, but a text box. Which I trust it isn't.

I am boggled by this.
There is no reason why your code as posted would not work if you closed the tags as per my example.

Can you show the code for the whole thing or else post a link to it?

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top