473,473 Members | 1,488 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to bring scroll bar to the top in IE 6.0

1 New Member
Hi All,

I tried alot with all the possible properties i found on the net...but not able to bring the scroll bar to top

In the end, i invented an alternative for this


STEP 1:- Please put the following code in the area where you want the scroll bar to come i.e if on Top then just put it on the top of the page

Code:- [HTML]<input type="text" name="txt_focus" style="border:none;">[/HTML]

STEP 2:- Please copy & paste the following code in the end of the page.

[HTML]<script>
document.all.txt_focus.focus();
document.all.txt_focus.style.display='none';
</script>
[/HTML]
It will work surely

Note:- please dnt change the name of textbox
For any queries please contact me @ **** (email removed - against site rules)
Aug 3 '07 #1
3 6310
gregerly
192 Recognized Expert New Member
Hi All,

I tried alot with all the possible properties i found on the net...but not able to bring the scroll bar to top

In the end, i invented an alternative for this


STEP 1:- Please put the following code in the area where you want the scroll bar to come i.e if on Top then just put it on the top of the page

Code:- <input type="text" name="txt_focus" style="border:none;">

STEP 2:- Please copy & paste the following code in the end of the page.

<script>
document.all.txt_focus.focus();
document.all.txt_focus.style.display='none';
</script>

It will work surely

Note:- please dnt change the name of textbox
For any queries please contact me @ rajangupta3349@gmail.com
Not to burst any bubble, but javascript is not needed for this, as HTML Anchor is the proper tag to be using for this task.

Ex: Add anchor tag to the top of the page:

[HTML]<a name='top'></a>[/HTML]

Then where ever you want to jump to the top:

[HTML]<a href='#top'></a>[/HTML]
Aug 3 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
Hi All,

I tried alot with all the possible properties i found on the net...but not able to bring the scroll bar to top

In the end, i invented an alternative for this


STEP 1:- Please put the following code in the area where you want the scroll bar to come i.e if on Top then just put it on the top of the page

Code:- [HTML]<input type="text" name="txt_focus" style="border:none;">[/HTML]

STEP 2:- Please copy & paste the following code in the end of the page.

[HTML]<script>
document.all.txt_focus.focus();
document.all.txt_focus.style.display='none';
</script>
[/HTML]
It will work surely

Note:- please dnt change the name of textbox
For any queries please contact me @ **** (email removed - against site rules)
This is possible with Javascript by using the window.scrollTo method (link).

Also, never use document.all. It is non-standard and only works in IE (and maybe one or two other browsers which have added support for it).
Aug 3 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Not to burst any bubble, but javascript is not needed for this, as HTML Anchor is the proper tag to be using for this task.

Ex: Add anchor tag to the top of the page:

[HTML]<a name='top'></a>[/HTML]

Then where ever you want to jump to the top:

[HTML]<a href='#top'></a>[/HTML]
I second that. Why use Javascript when HTML suffices? The same applies to Ajax. Don't use it for the sake of using Ajax.
Aug 3 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: ergobob | last post by:
Hello, I have two scroll boxes on the same page. The first scroll box is good in IE but the words will not wrap correctly in Firefox. The second scroll box is good in all browsers. You can...
3
by: Devonish | last post by:
I have a form designed as a Continuous form which displays one record per line. Taking account of the header and footer and the size of the screen, I can display 30 records at a time. I can see...
0
by: sara | last post by:
I have a DB and all of a sudden the DB window is gone - and I can't get it back. Note: I am having trouble with my laptop keyboard and it seems to have a ghost so things "happen" when I'm not...
6
by: Mike Johnson | last post by:
I have a ListView on a form, I'm displaying the items as a list. The Scroll is set to true. I want to know how can I set the scroll bar to Vertical?
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
I'm using the VScrollBar and set it as follow: m_vScrollBar.Minimum = -19602; m_vScrollBar.Maximum = 0; m_vScrollBar.SmallChange = 1; m_vScrollBar.LargeChange = 1089; m_vScrollBar.Value =...
9
by: korean_dave | last post by:
From command Prompt, i type in a script, "tryme.py". This, instead, brings up PythonWin editor and Interactive Window. Path variable is "C:\Python24". (I need Python 2.4 installed, not 2.5) ...
4
by: sureshl | last post by:
Hi, i dunno how to use calendar control . i need to bring data to the calendar on the respective date , whether calendar control will work both server side and client side. coz if i disable the...
12
Frinavale
by: Frinavale | last post by:
I think I'm trying to do something impossible. I have a <div> element with a overflow style set to "scroll". In other words my <div> element allows the user to scroll the content within it. ...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.