Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Anchoring using href="# and clean URL not working

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-12-2010, 07:47 PM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Anchoring using href="# and clean URL not working

I am trying to create a tabbed section on my product detail page and am using
<a href="#layer1">layer1</a> which works perfectly if I dont use clean URL

However, if I enable clean URL, clicking on the link goes to - www.mydomain.com/#layer1

as opposed to

www.mydomain.com/product1.html#layer1

Anything I am missing? I just want it to append the #layer1 to the current product URL as opposed to the homepage.

Here is an excerpt of the code:
<li class="active"><span class="leftspan-leftmosttab"></span><a href="#layer1"><span class="textspan">Recommended Products</span><span class="rightspan-middletab"></span></a><span class="clrb"></span></li>
<li class=""><span class="leftspan-middletab"></span><a href="#layer2"><span class="textspan">Send to Friend</span><span class="rightspan-rightmosttab"></span></a><span class="clrb"></span></li>
<li class=""><span class="leftspan-middletab"></span><a href="#layer3"><span class="textspan">Review</span><span class="rightspan-rightmosttab"></span></a><span class="clrb"></span></li>


Any help is highly appreciated.

Thanks so much for your time.
__________________
X-Cart: 4.2.1
Reply With Quote
  #2  
Old 03-12-2010, 07:51 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Anchoring using href="# and clean URL not working

Use href="product.php?productid={$product.productid}#l ayer1"
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 03-12-2010, 08:04 PM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Anchoring using href="# and clean URL not working

Quote:
Originally Posted by cflsystems
Use href="product.php?productid={$product.productid}#l ayer1"

Wouldn't that cause the page to be refreshed and take the user to the next visible tab?
Isn't there a way to just make the other layer visible without having the page refreshed?

Thanks so much for your help.
__________________
X-Cart: 4.2.1
Reply With Quote
  #4  
Old 03-13-2010, 06:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Anchoring using href="# and clean URL not working

Are you talking about tabs that are on top of each other and open when you click on ther title or bookmarks inside the page? If the first one that code won't work, for bookmarks - it will work, it won't reload the page
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 03-13-2010, 06:39 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Anchoring using href="# and clean URL not working

Quote:
Originally Posted by cflsystems
Are you talking about tabs that are on top of each other and open when you click on ther title or bookmarks inside the page? If the first one that code won't work, for bookmarks - it will work, it won't reload the page

I should have tried before making that statement. Sorry I doubted you

I give it a shot and it worked like a charm.

See it in action here - http://www.specialgifts2india.com/Mawa-Peda-Kesar.html

Thanks once again.
__________________
X-Cart: 4.2.1
Reply With Quote
  #6  
Old 03-13-2010, 08:02 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Anchoring using href="# and clean URL not working

No problem, glad you got it working. Like the design. I see some issues in IE though
1. JS error for variants
2. Advance Search doesn't line up with search
3. Review tab is missing its left side when "send to friend" is active
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:28 AM.

   

 
X-Cart forums © 2001-2020