Results 1 to 1 of 1

Thread: Javascript Code Required for calculating height....

  1. #1
    Join Date
    Apr 2009
    Thanked 0 Times in 0 Posts

    Default Javascript Code Required for calculating height....


    I am working on outlet pages of an online store.
    There are 4 products displayed on each row.
    On that store, products are displayed with images,product name, model no., price and buttons.
    For some products, the name is longer, for some price is longer.
    I am using <td> for displaying each information.

    The problem is - the height of the name's <td> and price's <td> are different for different products.

    I want a JS code which can detect the biggest height (for each row separately) from both the above td's separately and assign the maximum height to the corresponding 3 td's of that row.

    This should be done for each row separately.

    note : I an right now using this code - But it takes the height of both td's for 1st product only and assign it to all the products.

    <script type="text/javascript" language="javascript">

    var ht1 = document.getElementById("name_td1").offsetHeight;
    document.getElementById("name_td1").style.height = ht1;

    var ht2 = document.getElementById("price_td2").offsetHeight;
    document.getElementById("price_td2").style.height = ht2;


    Can someone help me ??????????????

    Last edited by dchopda; 07-06-2009 at 05:37 AM. Reason: text missing


Posting Permissions

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