Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Hiding HTML in a table (http://www.velocityreviews.com/forums/t164168-hiding-html-in-a-table.html)

Mark 02-08-2006 05:45 AM

Hiding HTML in a table
 
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



Toby Inkster 02-08-2006 08:21 AM

Re: Hiding HTML in a table
 
Mark wrote:

> 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;

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact


Mark 02-08-2006 08:56 AM

Re: Hiding HTML in a table
 
Thanks Toby, that worked perfectly!
Cheers
Mark
"Toby Inkster" <usenet200602@tobyinkster.co.uk> wrote in message
news:c9mob3-s9h.ln1@ophelia.g5n.co.uk...
> Mark wrote:
>
>> 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;
>
> --
> Toby A Inkster BSc (Hons) ARCS
> Contact Me ~ http://tobyinkster.co.uk/contact
>




Stan McCann 02-08-2006 04:29 PM

Re: Hiding HTML in a table
 
"Mark" <markusjnz@ggmmaaiill.com> wrote in
news:43e987e9@news.orcon.net.nz:

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

--
Stan McCann, "Uncle Pirate" http://stanmccann.us/
Webmaster, NMSU at Alamogordo http://alamo.nmsu.edu/
Now blocking Google Grouper posts and replies.
http://blinkynet.net/comp/uip5.html


All times are GMT. The time now is 04:29 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.