Hiding HTML in a table

Discussion in 'HTML' started by Mark, Feb 8, 2006.

  1. Mark

    Mark Guest

    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
     
    Mark, Feb 8, 2006
    #1
    1. Advertising

  2. Mark

    Toby Inkster Guest

    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
     
    Toby Inkster, Feb 8, 2006
    #2
    1. Advertising

  3. Mark

    Mark Guest

    Thanks Toby, that worked perfectly!
    Cheers
    Mark
    "Toby Inkster" <> wrote in message
    news:5n.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
    >
     
    Mark, Feb 8, 2006
    #3
  4. Mark

    Stan McCann Guest

    "Mark" <> wrote in
    news::

    > 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
     
    Stan McCann, Feb 8, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattB

    hiding table rows by id?

    MattB, Mar 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    12,398
    MattB
    Mar 9, 2005
  2. F. Da Costa
    Replies:
    6
    Views:
    9,459
    Leif K-Brooks
    Dec 4, 2003
  3. luna

    Hiding table rows .asp

    luna, Jan 17, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    443
  4. jc
    Replies:
    10
    Views:
    3,667
    Kevin Scholl
    Jun 30, 2009
  5. Ste
    Replies:
    41
    Views:
    811
    Thomas 'PointedEars' Lahn
    Aug 1, 2007
Loading...

Share This Page