Reply
Height adjustment on window-Scroll and window-Resize
Old 04-09-2008, 08:21 AM Height adjustment on window-Scroll and window-Resize
Novice Talker

Posts: 10
Name: Muhammad Abrar
HTML Div's Height adjustment is required on window-Scroll and window-Resize both.
This Div is makes the whole HTML body as Clickable (Navigate to specified URL).
I use the following code ,
Body - Onload
document.getElementById('TestDiv').style.height = document.documentElement.clientHeight;
window.onresize = resize;
window.onscroll = scroll;
function resize()
{
if (document.documentElement.scrollTop == 0)
{document.getElementById('TestDiv').style.height = (document.documentElement.clientHeight * 2.175); }
else
{document.getElementById('TestDiv').style.height = (document.documentElement.clientHeight * 5);}

}

function scroll()
{
document.getElementById('TestDiv').style.top = document.documentElement.scrollTop + "px";
}
above code does not make the whole Page background as clickable on Resize and Scroll events.
If any Idea then please give me a chance of thanks
AbrarNazeer is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Reply     « Reply to Height adjustment on window-Scroll and window-Resize
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11524 seconds with 13 queries