Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Footer Include Question


Guest

Recommended Posts

Does anyone out there know how to place a "Go to top" of page link in the footer include that works...?

 

I am new to PHP and need a helping hand...

 

I have tried:...

<li><a href="#" title="Go to top of page!">UP</a></li>

<li><a href="#anchor-top" title="Go to top of page!">UP</a></li>

<li><a href="<?php echo $_SERVER["REDIRECT_URL"]; ?>">Up</a></li>

 

All redirect to the catalog default - not to the top of the page...

 

Anyone know the secret...?

 

Thanks for any help - this thing is driving me batty!

Link to comment
Share on other sites

  • 2 months later...
Does anyone out there know how to place a "Go to top" of page link in the footer include that works...?

 

I am new to PHP and need a helping hand...

 

I have tried:...

<li><a href="#" title="Go to top of page!">UP</a></li>

<li><a href="#anchor-top" title="Go to top of page!">UP</a></li>

<li><a href="<?php echo $_SERVER["REDIRECT_URL"]; ?>">Up</a></li>

 

All redirect to the catalog default - not to the top of the page...

 

Anyone know the secret...?

 

Thanks for any help - this thing is driving me batty!

 

 

I know exactly how to do this within the context of regular HTML coding, but I'm sure its pretty similar within the cinstraints of php (not really knowing any real coding,yet) but it sounds like what you want is a named anchor.

basically you install a little piece of html that reads: <a name="top"></a> at the top of your page. then at the bottom in the footer, or where ever you want it.. you include this html: <a href="www.yoursite.com#top>Go to top of page!</a>

 

 

This was taken from HTMLgoodies.com : (the link is to the page... scroll down a bit, and I'm sure if you do a little looing around you'd find more to help ;) )

 

Q. I would like to be able to create clickable buttons at the top of my page to link to different places further down the page.

 

A. Add this link code to your button image:

<a href="#link1"><img src="yourbuttonname.gif"></a>

Then where you want it to link to, add this anchor code:

<a name="link1"></a>

When you click the button it will jump down on the same page to the anchor.

 

 

 

good Luck

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...