By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,083 Members | 2,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,083 IT Pros & Developers. It's quick & easy.

scroll bar pop-up

P: n/a
I want to make a pop-up window with a scroll-bar, which a user can select a
value with, and send it back to server. this server will then send back a
new page containing that value. Also, opening the window again, the
scrollbar would still be in that position.

To make this clearer, the sequence I am thinking of is this:-
1. user clicks "enter value" button in main window
2. new window with scroll bar opens
3. user moves scroll-bar to desired position (eg. 500)
4. user selects "use this value" button
5. pop-up sends information to main window, and closes itself
6. the main window posts-back this new value
7. the new page shows this value, and some information derived from it
8. user clicks the "enter value" button again
9. window opens, and the scroll bar is in the place it was left in (eg.
500)

I can open up a window with a scroll bar in it (see code for the window
itself below), and I can read the value, but my javascript doesn't move the
scrollbar - any ideas on this? My scroll-bar is ugly too, and I would like
to replace some parts with images. Also, how do I pass the values between
the two windows (main and pop-up)?

Finally, I am used to ASP, rather than ASP.NET. I keep reading that using
Value=Request("Value") is now bad. What should I use instead of this to get
information between the client and server?

Thanks
ME

(Note - code below sig)

--
Martin Eyles
ma**********@NOSPAM.bytronic.com
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="TimeEntry3.aspx.vb" Inherits="LineViewProto.NET.TimeEntry3"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TimeEntry3</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<style> .scroller {}
</style>
<script>
function setscroll(){
xposa=document.getElementById("scrolly");
xposb=xposa.scrollLeft;
xposb=500;
}

function message(){
xposa=document.getElementById("scrolly");
xposb=xposa.scrollLeft;
alert(xposb);
}
</script>
</head>
<body ms_positioning="GridLayout" onload="javascript:setscroll()">
<form id="Form1" method="post" runat="server">
<div id="scrolly" class="scroller" style="OVERFLOW:scroll;
WIDTH:300px; HEIGHT:16px">
<div style="WIDTH:1300px; HEIGHT:0px">
</div>
</div>
<a href="javascript:message()">read poisition of scroll bar</a>
<!-- button here to go back to server-->
</form>
</body>
</html>
Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.