473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

keeping div height on screen.availHeight in combination with AJAX (and the scrollprosition)

ton
Hi,

I've a treeview in a DIV, with scrollbars. The height of the div depends on
the screen.availHeight.
On onload and onresize this value is updated. Now my problems:

- using Ajax a buttonclick will reset the height of the div tag to the
original one
- i've use a =SetDivPosition() to keep the actual scroll position, but since
window.load isn't called using ajax the last scrollposition is not restired.

There must be a function for the window I can use to restore height and
scrollposition?

Thanx
ton

Oct 20 '08 #1
1 1744
ton
I've found the solution on the web and I've added a script block just after
the </asp:ScriptManagertag

the ResetPositions function is called and everything works fine !

<body id="doc">
<form id="form1" runat="server">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<script type="text/javascript" language="javascript">
Sys.WebForms.PageRequestManager.getInstance().add_ endRequest(EndRequestHandler);

function EndRequestHandler (sender, args)
{
ResetPositions();
}
</script>

"ton" <to*@nospam.nlschreef in bericht
news:c6***************************@cache5.tilbu1.n b.home.nl...
Hi,

I've a treeview in a DIV, with scrollbars. The height of the div depends
on the screen.availHeight.
On onload and onresize this value is updated. Now my problems:

- using Ajax a buttonclick will reset the height of the div tag to the
original one
- i've use a =SetDivPosition() to keep the actual scroll position, but
since window.load isn't called using ajax the last scrollposition is not
restired.

There must be a function for the window I can use to restore height and
scrollposition?

Thanx
ton
Oct 20 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raffi | last post by:
Here's my HTML code. What I'm trying to do is when the button is pushed to refresh the popup window information, I want the popup to return to the front. The way my code is now, when refreshed the...
9
by: pow67 | last post by:
Is there a javascript statement which can be incorporated in a hyperlink which will open a new page that fills the screen while leaving the page with the link open? Thanks in advance. CW
5
by: Pugi! | last post by:
I am making a site with lot of AJAX components. When I present a form (in a layer on top of contents of page) I want to make sure that the user cannot click on a link or button other then on the...
1
by: nitinp | last post by:
Hi, I am opening a popup window "PW.aspx" on click of a button on page "MyPage.aspx". I want to determine width and height of "PW.aspx" on "PW.aspx". I want it for IE window.screen.availHeight...
24
by: dE|_ | last post by:
I have started looking into scripts for screen size detect with the intention of using them to pick from a number of CSS style sheets tailored to the size. Is there a good reason why this is not...
3
by: =?Utf-8?B?S2V2aW4=?= | last post by:
Hi! How can I make that my application run in full screen mode? Thanks
4
by: gobblegob | last post by:
hi guys , i am making a screen capture program and i want my main form to stay on top so the user can take a screen shot of full screen games, i have found lots of stuff to keep it on top of all...
5
by: tader | last post by:
Hi again, so i got another question this time i need to get full web height but i just can't do it can anyone help me plz i try to use innerHeight, screen.availHeight and so on but thous function...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.