Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links to area on same page


ksaun

Recommended Posts

Hey All :thumbsup:

 

I want to add some links at the top of some of my longer pages that when clicked will take the visitor to a spot on the page.

 

IE:

link 1

link 2

link 3

 

link 1

lsjdlkjsdblfkajsdljavcsdblkjabsdljalsdjflakjsdlakjsdljkasdlfkjasdljfa

 

link 2

ksda;flksdf;lkasdf;lkasdh;flkasd;lfkas;ldfh;alskfh;lasdhf;laksdf;lkas

 

link 3

laskjfbcpwqiouepwqupuebqwpcbdpvuqbewp[oufqwbpefubqpweufvbpqw

 

Here is the code I have been trying to use with not much success

 

<tr>
   <td width="90%" align="left">
   <b><font face="Verdana" size="1"><a href="#Toner">
   <img border="0" src="/images/categories/arrow_right.gif" width="9" height="9"> 
   Toner</a></font></b></td>
 </tr>

 

Which should take me to this:

 

<tr>
   <td width="90%">
   <font face="Verdana" style="font-weight: 700" color="#666666" size="2">2. 
   Toner<a name="Toner"></a></font></td>
 </tr>

 

Any Ideas what I'm doing wrong? :blink:

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

2. Toner<a name="Toner"></a>

 

Change this to:

 

<a name="Toner">2. Toner</a>

 

Should work fine then. At the minute you have nothing within the anchor tags, so it isnt linking TO anywhere, by adding the text between the anchor tags, the html makes sense again.

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

2.    Toner<a name="Toner"></a>

 

Change this to:

 

<a name="Toner">2.  Toner</a>

 

Should work fine then. At the minute you have nothing within the anchor tags, so it isnt linking TO anywhere, by adding the text between the anchor tags, the html makes sense again.

Didn't work :-"

 

It keeps taking my back to the Home Page

 

Check it out My Webpage

 

Any other Ideas? :blush:

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

Didn't work :-"

 

It keeps taking my back to the Home Page

 

Check it out My Webpage

 

Any other Ideas? :blush:

Anyone?? :huh:

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

Format your link like this

<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . "/#Toner" . '">Text goes here</a>

where FILENAME_DEFAULT is the page you are on.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Format your link like this
<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . "/#Toner" . '">Text goes here</a>

where FILENAME_DEFAULT is the page you are on.

 

Jack

 

Still Not working :blink:

 

Here is the code I have:

<tr>
   <td width="90%" align="left">
   <b><font face="Verdana" size="1"><img border="0" src="/images/categories/arrow_right.gif" width="9" height="9"><a href="' . tep_href_link(FILENAME_TOP_10, '', 'NONSSL') . "/#10.Quality" . '">10. Quality</a></font></b></td> 
 </tr>

 

and Here is the code near the place I want the link to go to:

 

<tr>
   <td width="90%">
   <font face="Verdana" style="font-weight: 700" color="#666666" size="2">
   <a name="10. Quality">10. 
   Quality</a></font></td>
 </tr>

 

What am I doing wrong? :huh:

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

Still Not working :blink:

 

Here is the code I have:

<tr>
? ?<td width="90%" align="left">
? ?<b><font face="Verdana" size="1"><img border="0" src="/images/categories/arrow_right.gif" width="9" height="9"><a href="' . tep_href_link(FILENAME_TOP_10, '', 'NONSSL') . "/#10.Quality" . '">10. Quality</a></font></b></td> 
?</tr>

 

and Here is the code near the place I want the link to go to:

 

<tr>
? ?<td width="90%">
? ?<font face="Verdana" style="font-weight: 700" color="#666666" size="2">
? ?<a name="10. Quality">10. 
? ?Quality</a></font></td>
?</tr>

 

What am I doing wrong? :huh:

 

Figured it out :thumbsup:

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

Figured it out  :thumbsup:

Hi Keith,

 

Could you post the code that works? I want to do something similar on one of our pages but couldn't figure out how to do it.

 

TIA,

 

Karen

Link to comment
Share on other sites

Hi Keith,

 

Could you post the code that works? I want to do something similar on one of our pages but couldn't figure out how to do it.

 

TIA,

 

Karen

The code I posted was correct I just forgot to put a space in.

 

Here is the code now:

<tr>

    <td width="90%" align="left">

    <b><font face="Verdana" size="1"><img border="0" src="/images/categories/arrow_right.gif" width="9" height="9"><a href="' . tep_href_link(FILENAME_TOP_10, '', 'NONSSL') . "/#1. Warranty" . '"> 1. Warranty</a></font></b></td>

  </tr>

and where you want the link to go to place this just above it:

 

<tr>

    <td width="90%">

    <font face="Verdana" style="font-weight: 700" color="#666666" size="2">

    <a name="1. Warranty">1. Warranty/COLOR]</a></font></td>

  </tr>

 

thats it :thumbsup:

 

The text in red must be changed to your own text and path.

My Favorite Quote from a movie.

 

Question: How do you know women sooo well?

 

Answer: I think of a man, then take away reason and accountability.

Link to comment
Share on other sites

The code I posted was correct I just forgot to put a space in.

 

Here is the code now:

and where you want the link to go to place this just above it:

thats it  :thumbsup:

 

The text in red must be changed to your own text and path.

 

no need for the actual file name ... I use this for my go to top links:

 

<tr>

<td align="right" class="miniText"><a href="<?php echo basename($PHP_SELF); ?>#gototop"><?php echo TEXT_GOTOTOP; ?></a> </td>

</tr>

 

:-)

Monika

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...