Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2003
    Thanked 0 Times in 0 Posts

    Retrieving Table & Cell attributes

    This stems from my original problem you can read about here:


    You don't need to read that to help but anyway - if it can't be fixed using HTML i will need another (PHP) solution!

    Anyway, my question:

    Is there a way to retrieve the height/width of table cells as defined in HTML <table><tr> and <td> tags when they have active (and therefore resizing) content?

    That way I could assign these values to variables and put them into my PHP code to create my own autoresizing table.

    Any other possible solutions I would also like to hear!

  • #2
    Senior Coder
    Join Date
    Jun 2002
    frankfurt, german banana republic
    Thanked 0 Times in 0 Posts
    PHP runs on the server and not in the browser. Hence, it has no idea what autoresized tables are nor how to get at their respective witdth. You need a JavaScript solution to do exactly that.

    Depending on how you generate the "active content", you could scan the "active content" for a potential HTML element (like an <img>) whose width is determined in the code (by setting the attribute) and calculate if it conflicts with the width of your table cell, but you can only do that *before* the file is sent to the browser.
    De gustibus non est disputandum.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts