Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Retrieving Table & Cell attributes

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

    Autoresize failure and Tables cells

    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
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    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
    •