Why does a link take me to a different site?

How do you get an HTML link that just shows more info on a page but doesn't take you to a different page or site?

  • Answer:

    You would need to make the target of the HTML link to be a Java Script rather than a web page. The java script can then hide/show parts of a page (using DHTML) or even go off to the Internet to download information and then display it on the same existing web page (using AJAX). The "A" tag would look something like this: <a href="javascript:revealAnswer()">Click to see the answer</a> Here is a good web site that explains DHTML: http://www.w3schools.com/dhtml/dhtml_examples.asp

community wiki at wiki.answers.com Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.