Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi all.

I have a javascript function which adjusts the column height(div) at runtime.

It is working fine in the developement environment but at ISS an exception is thrown saying object required.

Could you please help me. Following is my function...

function AdjustColumnsHeight() {
    // get a reference to the two DIVS that make up the columns
    var centerCol = window.document.getElementById('centercol');
    var leftCol = window.document.getElementById('leftcol');
    // calculate the max height
  
    var hCenterCol = centerCol.offsetHeight;
    var hLeftCol = leftCol.offsetHeight;
    var maxHeight = Math.max(hCenterCol, hLeftCol);

    // set the height of all 2 DIVS to the max height
    centerCol.style.height = maxHeight  + 'px';
    leftCol.style.height = maxHeight  + 'px';
      }


Thanks in advance.
Posted
Updated 11-Jun-11 20:58pm
v2
Comments
Sergey Alexandrovich Kryukov 12-Jun-11 2:51am    
Java script (which is nonsense) of Javascript. Ever heard of Java?
What is ISS -- just curious.
--SA
thatraja 12-Jun-11 6:20am    
I think he meant IIS...(probably typo)
[no name] 12-Jun-11 19:26pm    
@SAKryukov: You are simply arrogant, nothing more!
CP'S netiquette: "Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.. "
Seems not to be a addressed to SAKryuko....
thatraja 12-Jun-11 6:20am    
which line error occurs?
[no name] 13-Jun-11 0:37am    
Yes I mean IIS.

I think I have got the problem. the function was written in a .js file. now I write it at master page and its working.

Any way can you tell me what may be the problem if I use another .js file? Its working on development server but not in IIS.

1 solution

Can you please explain that how the JavaScript is connected with ISS? SO the problem should be in another area. Just see the IDs of the controls how they are rendered.
 
Share this answer
 
Comments
Shahriar Iqbal Chowdhury/Galib 12-Jun-11 4:44am    
not a solution, pls post this as your comment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900