473,585 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Start page at different locations?

I would like to be able to set the start location of a page each time its
displayed depending on the value of a request object -i.e

// Called from <body> onload attribute
function load()
{
<%
String startAtLink = (String)request .getAttribute( "startatlin k" );

if(startAtLink! =null)
{
%>
// jump to location of startAtLink link e.g Step3 defined as <a
name="Step3"></a> futher on down
// may also have Step4, Step5 etc...
<%
}
%>

thanks

harry
Jul 20 '05 #1
2 2135
Harry wrote:
I would like to be able to set the start location of a page each time its
displayed depending on the value of a request object -i.e

// Called from <body> onload attribute
function load()
{
<%
String startAtLink = (String)request .getAttribute( "startatlin k" );

if(startAtLink! =null)
{
%>
// jump to location of startAtLink link e.g Step3 defined as <a
name="Step3"></a> futher on down
// may also have Step4, Step5 etc...
<%
}
%>

thanks

harry

No need for js at all.

http://www.site.com/mypage.html#Step3

Jul 20 '05 #2
Trouble is, I'm using struts & forwarding to jsp pages with # on the end is
a bit tricky if at all possible - got around it now using

<%
String startAtLink = (String)request .getAttribute( "startatlin k" );
if(startAtLink! =null)
{
%>
window.location = '#<%= startAtLink %>';
<%
}
%>

seems to work well - thanks anyway!

"Kevin Thorpe" <ke***@pricetra k.com> wrote in message
news:3f******** *************** @news.easynet.c o.uk...
Harry wrote:
I would like to be able to set the start location of a page each time its displayed depending on the value of a request object -i.e

// Called from <body> onload attribute
function load()
{
<%
String startAtLink = (String)request .getAttribute( "startatlin k" );

if(startAtLink! =null)
{
%>
// jump to location of startAtLink link e.g Step3 defined as <a name="Step3"></a> futher on down
// may also have Step4, Step5 etc...
<%
}
%>

thanks

harry

No need for js at all.

http://www.site.com/mypage.html#Step3

Jul 20 '05 #3

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

Similar topics

2
2042
by: Gerry Viator | last post by:
Hi all, Using VS.NET 2003 and VB.NET Why does the Modified Date on the Start Page not Update the Date correctly? A Bug? Also seams under the name column on the Start Page also doesn't Update correctly? Anyone else notice this problem? Are they going to fix it? There should also be some options to Move \Save\ the project to another...
3
2555
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their details, their locations, and then add themselves to categories. Each category requires additional info from the suppliers, this additional category info...
8
11150
by: Bernard Lebel | last post by:
Hello, I would like to know if there is a way to run a Python file under a different user account than the one logged in. Allow me to explain. There are a bunch of people here, they are "basic user", with limited permissions. Basically there are locations on the network where they can only read and execute files, but no way to write. ...
9
3176
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.).
0
1331
by: amiben | last post by:
Hi everyone. I have this problem that I am experiencing when I move a certain site from one hosting to another hosting location. This is why I think this problem is not related to ASP code, rather than to IIS settings which are different in one hosting company to another. I am talking about a site I have that has no pages on it, rather it...
5
5477
by: BD | last post by:
I am coding with C# in Visual Studio 2005 for a database application residing on remote MS SQL Server 2005. What I want to do is open the same form but from 2 different places and only one instance. I currently have the form where it will open from a double click on datagridview from another form to the proper record and only one instance. ...
0
972
by: PFancy | last post by:
Hi, Not sure if anyone can help. I have writen some code that will allow users to edit a txt file (it's actually an xml file) in notepad. I can get notepad to open correctly with the correct file, but once changes have been made and you want to save the file it errors with "Cannot create the Locations.xml file. Please check that the filename...
4
3804
by: perhapscwk | last post by:
Sample tables (company_id RK companies.id): Companies id company 1 … 2 … 3 … Locations id company_id location revision
0
2100
by: Josetta | last post by:
Here is something really bizarre that is happening...let me see if I can describe it. I have a report which has two locations on it. Primary Location and Secondary Location. I have both locations grouped. For example: Primary Location (group header 1) is a city. Secondary Location (group header 2) is a Street Address.
0
7908
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7836
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8336
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8212
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6606
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5389
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.