Link to home
Start Free TrialLog in
Avatar of mmarth
mmarth

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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&
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/
Avatar of mmarth
mmarth

ASKER

my problem was that i was creating a php button which had a submit as the link. thanks
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.