Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to append the current page URL


timmyriddle

Recommended Posts

Posted

Hello,

I'm currently improving the appearance of my product_info.php page and I need some help with appending a URL.

 

The page has several tabs for product description, specification, related links etc. and neach tab is accessed by adding #description (for example) to the current page url.

 

The problem I'm having at the moment is obviously that as soon as a link is clicked, the url becomes product_info.php#description rather than product_info.php?products_id=25#description for example.

 

I hope I've explained this well enough, can anyone give me a pointer?

 

Tim. :thumbsup:

Posted

correction!

 

what I want is

catalog/product_info.php?products_id=25#description

 

but what I get is

catalog/#description

 

sorry for the mistake!

 

All help greatly appreciated.

 

Tim :thumbsup:

Posted

Sorted! I used location.href so in my javascript it now looks like this

 

<a href="'+location.href+'#description">

 

Hope this helps someone somewhere!

 

Tim.

Archived

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

×
×
  • Create New...