Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 16th, 2008, 12:22 PM
Registered User
 
Join Date: Nov 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Anchor Tag

Using the Anchor Tag need to reload a page (which is ok), but need to jump to a particular section of the page). The problem is the page reload is file, but upon reload jumping to a particular section on the page is what I am looking for..Any suggestions are welcome.
Tried putting a div tag enclosing the section that I wanted to have the focus upon, and then setting the focus via javascript when the required page reloaded. The problem is that since the section is down below in the page, when the page reloads upon the click of the anchor tag, the javascript for obvious reason does not find the div tag on the page (as the page has not completely reloaded).


  #2 (permalink)  
Old November 16th, 2008, 04:02 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Usually this is done with a named anchor tag:

<a name="focusHere"></a>

Then you link to the url that is on with the additional anchor name information:

<a href="mypage.aspx#focusHere">Click me</a>

If you want to do this with the javascript, you would typically put the javascript in the page's body tag onLoad handler do it fires after the page is loaded.

-Peter
compiledthoughts.com
  #3 (permalink)  
Old November 18th, 2008, 05:57 AM
Authorized User
 
Join Date: Jul 2007
Location: , , .
Posts: 13
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thank you very much, it worked well for me...

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
http://coco4info.com/comment.aspx
http://commentdirectory.com/resources.aspx
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anchor tag visited CSS related question mat41 Classic ASP Basics 0 April 16th, 2008 05:55 PM
Want to pass value at href in anchor tag on xslt Abhinavnaresh XSLT 4 February 21st, 2008 04:32 AM
place anchor tag around bgImage inside cell?? mat41 HTML Code Clinic 4 January 26th, 2006 07:42 AM
Problem with input type image With Anchor tag vinkumrect Javascript How-To 1 July 21st, 2005 08:59 AM
Javascript in Anchor Tag jamara JSP Basics 1 May 30th, 2005 01:00 AM



All times are GMT -4. The time now is 04:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.