Hiding HTML in a table

M

Mark

Hi, I am using some code to allow a person to click on a link and insert
some HTML into a WYSIWYG editor.

Basically, I have a two column table

Column 1 has a link which when clicked on gets the HTML from column 2 and
passes it to the editor.
As the application is running on IE I am using the innerHTML property and a
DIV tag to get and store the information respecitvely.

e.g.

<div id="MyHtml">
My text is here
</div>

and then I pass through the info by going

document.getElementById('MyHtml').innerHTML

This works fine, but I want a way of hiding the HTML which is to be passed
through. I tried setting the style of the div tag (visibility:hidden;) and
this does hide the tag but the table cell where the HTML remains the size of
the enclosed HTML (i.e. Really big) even though the HTML is hidden.

Any ideas more than welcome

Thanks
M
 
T

Toby Inkster

Mark said:
This works fine, but I want a way of hiding the HTML which is to be passed
through. I tried setting the style of the div tag (visibility:hidden;) and
this does hide the tag but the table cell where the HTML remains the size of
the enclosed HTML (i.e. Really big) even though the HTML is hidden.

display: none;
 
S

Stan McCann

This works fine, but I want a way of hiding the HTML which is to be
passed through. I tried setting the style of the div tag
(visibility:hidden;) and this does hide the tag but the table cell
where the HTML remains the size of the enclosed HTML (i.e. Really
big) even though the HTML is hidden.

IIRC, there was a similar thread recently in one of the PHP (alt.php?)
groups. I think the solution was display:none on the <tr>. HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top