Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi am getting this error in my javascript function..


C#
function resizeMastersLayout() {
//in this line
    var layoutPosition = document.getElementById('hfMinMaxRestore').value;
    minMaxRestoreButton(layoutPosition);
    if (layoutPosition == 'Minimise') {
        document.getElementById('divInputSliding').style.display = 'block';
        document.getElementById('divGridSliding').style.display = 'none';
    }


can any one suggest me how to avoid this error.
thanks
Posted

Check if var layoutPosition is coming null before comparing in If loop or post
 
Share this answer
 
Comments
ythisbug 18-May-12 1:23am    
hi i put breakpoint and checked in layoutPosition its showing as undefined..
so can u tel me where have to change?
It is because your C# code is not setting hiddenfield value "hfMinMaxRestore" in all code path. you need to check your c# code .

or post it for more specific solution
 
Share this answer
 
Comments
ythisbug 18-May-12 5:01am    
ok thanks dude i will

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