• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

navigate to a linked target on html page without page refresh

how do I navigate to a <a> linked target on html page without having to reload php generated content. if I click on a link to a target such as 'Top of Page', it refreshes to entire page content.
0
mmarth
Asked:
mmarth
  • 3
1 Solution
 
Robert SchuttSoftware EngineerCommented:
For this usually a hash sign is used:
<a href="#">Top of Page</a>

Open in new window

0
 
COBOLdinosaurCommented:
Any element with an id can be targeted with
<a href="#someid">Go to ID</a>

There are a whole range of effects using targets


Cd&
0
 
Robert SchuttSoftware EngineerCommented:
You can add target id's to your page, making it possible to link to different sections, or have it done automatically: http://www.kryogenix.org/code/browser/generated-toc/
0
 
mmarthAuthor Commented:
my problem was that i was creating a php button which had a submit as the link. thanks
0
 
Robert SchuttSoftware EngineerCommented:
Hmm, not sure how my solution helped you in that case. I assume you just made sure the "#someid" was included in the action url or redirected url from that action page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now