Solved

navigate to a linked target on html page without page refresh

Posted on 2013-01-27
5
244 Views
Last Modified: 2013-01-27
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
Comment
Question by:mmarth
  • 3
5 Comments
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 38824576
For this usually a hash sign is used:
<a href="#">Top of Page</a>

Open in new window

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 38824584
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
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 38824589
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
 
LVL 6

Author Closing Comment

by:mmarth
ID: 38824923
my problem was that i was creating a php button which had a submit as the link. thanks
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 38824936
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now