Jump to content


Photo

Problems with internal Hyperlinks


  • Please log in to reply
4 replies to this topic

#1 frypanman

frypanman
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 20 April 2006 - 04:38 PM

Hi,

I have a website I am working on and on the FAQ page the qestions at the top in a table are linked to bookmarks for each topic on the same page. The page is php, and I can't seem to get the bookmark links to fuction. Maybe I am calling it wrong as it is the way I did it on straight html pages in the past. Any suggestions will be greatly appreciated.

Thanks,

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 April 2006 - 05:01 PM

show me the source code, I see if I can find out what's wrong, in order to get a page to link to the same page, you drop an anchor where you want it to, and call the anchor where you want the link to be, then it shouldjump to that part of the page, either show me the website, along with whatever php source code that is related, I will see if I can help.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 frypanman

frypanman
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 20 April 2006 - 05:12 PM

Hi,

I very much appreciate your help, being relativly new to php.
Here is a section of the code.


define('NAVBAR_TITLE', 'FAQ');
define('HEADING_TITLE', 'FAQ');

define('TEXT_INFORMATION', '<h4><a name="top">Click On The Following Questions For The Answers</a></h4><br/>
<br/>
<a href="#q1">What is Handmade Goat Milk Soap Made of?</a><br/>
<a href="#q2">What is the benefit of goat milk in soap?</a><br/>
<a href="#q3">Why should I use Handcrafted Goat Milk Soap?</a><br/
<a href="#q4">Is there a way to make Handcrafted Soap Last Longer?</a><br/>
<a href="#q5">Is there Lye in my Soap?</a><br/>
<a href="#q6">What is Saponification?</a><br/>
<a href="#q7">Why is Glycerin Important?</a><br/>


<h4><a name="q1">What is Handcrafted Goat Milk Soap Made Of?</a></h4>
<p>Look on the label. Our soap is made of Goat milk,
Olive oil, Vegetable oil, Coconut oil, Canola oil, Borax,
Glycerin, Lye (essential for saponification), and Pure Essential Oils.
These are all pure ingredients. The essential oils are the same oils used
in aromatherapy. It is made with the cold process method to keep all of the
beneficial properties of the soap intact as possible. All of our soap is
made in small batches by hand. Goat Milk makes up nearly 40% of each batch,
giving you soap that can truly claim to be made of Goat Milk.</p>

<a href="#top">Back to Top</a>


<h4><a name="q2">What Is The Benefit Of Goat Milk In Soap?</a></h4>
<p>Milk is good for the skin because of its hydrating properties, which promote
moisture and prevents dryness. It helps reduce skin darkening brought about
by the wear and tear of aging. Milk contains essential proteins and amino
acids, and vitamin A that nourish skin.</p>

<p>Milk is rich in beta-hydroxyl acids that act as natural skin conditioners;
these conditioners exfoliate old skin, soothe and soften, producing smooth,
glowing skin. Another important nutrient in milk is lactic acid, which helps
to gently clean and soften skin. Lactic acid is great for stimulating skin cell renewal.</p>

<p>Modern laboratories now know why milk worked wonders for peoples skin in the
past: The lactic acid in milk is an alpha-hydroxyl acid, a natural substance that
dissolves the glue holding dead skin cells together. Milk has been proven to cleanse
the skin down to its deepest layers.</p>


This same code works perfect on a html page I don't know why it won't work in php?

Thanks again,



#4 frypanman

frypanman
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 20 April 2006 - 05:33 PM

Oh I should add that these links return me to the main index page instead of the anchor tag on the page.

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 20 April 2006 - 06:15 PM

set each one up to follow this example

You should notice that a named anchor is not displayed in a special way.

To link directly to the "tips" section, add a # sign and the name of the anchor to the end of a URL, like this:

<a href="http://www.w3schools...inks.asp#tips">
Jump to the Useful Tips Section</a>

A hyperlink to the Useful Tips Section from WITHIN the file "html_links.asp" will look like this:

<a href="#tips">Jump to the Useful Tips Section</a>

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users