Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Controlling Layer Scrolling
 

edelhart@manateebay.com




quote this post edit post

IP Loged report this post

Old Post  02-28-06 - 11:21 PM  
I have a layer with a scrollbar and I want to have it scrolled to a
specific place when the page loads. I would ideally want to do this
with CSS, but if I have to, with JS. Any ideas?

**************** CODE **********************

<style>
.dal_groupset_list
{
overflow: scroll;
height: 120px;
}

</style>

<div class="dal_groupset_list" id="<{$dal_form }>_dal_groupset_list"
style="scrollTop: <{$dal_scroll}>">

<!--- many lines of content -->

</div>
<script language="javascript">
xoopsSetElementProp('<{$dal_form }>_dal_groupset_list',
'scrollTop',
'<{$dal_scroll}>');

function xoopsGetElementById(id){
if (document.getElementById) {
return (document.getElementById(id));
} else if (document.all) {
return (document.all[id]);
} else {
if ((navigator.appname.indexOf("Netscape") != -1) &&
parseInt(navigator.appversion == 4)) {
return (document.layers[id]);
}
}

}

function xoopsSetElementProp(name, prop, val) {
var elt=xoopsGetElementById(name);
if (elt) elt[prop]=val;
}

</script>

****************** END CODE ********************

(the <{  }> elements are server side SMARTY includes.
$dal_scroll is an integer.
$dal_form is a string.
)



Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 05:55 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Dreamweaver archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top