PDA

View Full Version : help please


robynne
03-Oct-2003, 01:42 PM
i have a link at the bottom of each of my store pages to return user to the top of page as follows:
<a href="#"> Return to top</a>

This works fine UNLESS i enter any page via the search screen, in which case the 'return to top' takes me to the front page of the catalog. WHY????

For example go to www.dislocate-records.com/acatalog, type 'candy' in search box, select a choice and on the page that is displayed, scroll to bottom and click 'return to top'. It takes you to the top - of a different page!
I think it has something to do with the page being displayed via the search script.

Can anyone provide a workaround for this?

TIA,
Robynne

TraceyG
03-Oct-2003, 03:13 PM
Hi Robynne,

The problem is that the base href is being added to the front of your link. You could try one of the following:

<a href="javascript:window.scrollTo(0,0)">Back to top of page</a>

or

<img src="image.gif" width="x" height="x" border="0" alt="Back to top" onClick="java script:window.scrollTo(0,0)">

or

<img src="image.gif" width="x" height="x" border="0" alt="Back to top" onClick="GotoAnchor('top')">

With the last option you will have to create an anchor at the top of the page.

I hope this helps.

robynne
03-Oct-2003, 03:49 PM
Tracey,
thanks heaps - i'll give it a go.
cheers,
Robynne

Sly9er
09-Oct-2003, 06:19 AM
You could also use the proper Server Variable
for the OS that your site is on.
Windows, UNIX, etc.

robynne
09-Oct-2003, 09:06 AM
Hi John,
excuse my ignorance, but what is the proper server variable (I'm good at other stuff...,honest :D )
My site runs on a Unix server.

Sly9er
09-Oct-2003, 05:09 PM
Server variables are kind of like server side includes.
(as they can be used similarly)
They get information from the server... like what
web page your viewing.
But before I go any further and confuse you even
more, please tell me if you are running on a UNIX
or Windows Server

robynne
09-Oct-2003, 09:43 PM
John,
I'm running on a UNIX server.