Solved

navigate to a linked target on html page without page refresh

Posted on 2013-01-27
5
241 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 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

14 Experts available now in Live!

Get 1:1 Help Now