473,382 Members | 1,204 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,382 software developers and data experts.

onload and move to a point down the page

I am looking for a way to open a given html page where I want, and not
at the top of the page.

This is for an intranet, not the www. I use a core application which
takes templates containing FoxPro function calls and creates html pages
which are then sent to the browser. As a result, I am unable to modify
the url to simply attach the target id to the url to enable the browser
to open the page at the point I want.

So, is there something that I can put in the onload attribute of the
<body> tag which would direct the browser down to the point I want (ie
by id value of a div)? In other words, do the equivalent of
"www.someurl.com/page.html#someid"?

Thank you.
--
Christine

Jul 20 '05 #1
1 4513
DU
Christine Forber wrote:
I am looking for a way to open a given html page where I want, and not
at the top of the page.

This is for an intranet, not the www. I use a core application which
takes templates containing FoxPro function calls and creates html pages
which are then sent to the browser. As a result, I am unable to modify
the url to simply attach the target id to the url to enable the browser
to open the page at the point I want.

So, is there something that I can put in the onload attribute of the
<body> tag which would direct the browser down to the point I want (ie
by id value of a div)? In other words, do the equivalent of
"www.someurl.com/page.html#someid"?

Thank you.


<head>
(...) usual declarations (...)
<script type="text/javascript">
function init()
{
if(document.getElementById &&
document.getElementById("someid").scrollIntoView)
{
document.getElementById("someid").scrollIntoView(t rue);
};
// will work in MSIE 5+ and Mozilla-based browsers. Not in Opera.
}
</script>
</head>

<body onload="init();" ...>

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #2

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

Similar topics

2
by: Bender | last post by:
Hi, I am wanting to capture an onmousedown event without firing the body tags onload event. Also, if anyone could explain why this happens that would be excellent. I can't see how an...
7
by: Tery Griffin | last post by:
Hi all, Iıve been away from Javascript for awhile and am rusty, but this is too simple not to work! Iım on a Mac, and usually use the Safari browser. I have a very basic web page in a frame. ...
4
by: David Virgil Hobbs | last post by:
My web host inserts banner ads into my html pages. The javascript in these banner ads interferes with the onload triggered javascript functions in my pages. Whether I trigger my javascript...
10
by: berg | last post by:
I'm trying to use the onload event to load a series of urls. What I find is that the onload function is only called one time no matter how large the array. Here is the onload function. var...
9
by: nntp | last post by:
Is there anyway to do something exactly like onload, but without the word onload? I am trying to write inline js without onload, so I don't know how to trigger/start the script.
2
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would...
3
by: Christian | last post by:
hi, what is the difference between the Page_Load() and OnLoad() event handlers. do they originate from a different point ?
4
bats fur eels
by: bats fur eels | last post by:
Hi, I was hoping if anyone knew if it were possible using HTML or other basic scripts that enable you to lets say, scroll the webpage down a few margins upon load of page or script. So that it will...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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...

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.