Support Forums

HTML Anchor problem

This is a discussion on HTML Anchor problem within the Templates, HTML, CSS, and Design Help forums, part of the General category; I'm trying to link within my FAQ page (anchor) and it wont work. It just links me to my home ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 01-02-2009, 01:26 PM   #1
Member
 
Join Date: Dec 2008
Posts: 55
Rep Power: 9
island1 is on a distinguished road
Default HTML Anchor problem

I'm trying to link within my FAQ page (anchor) and it wont work. It just links me to my home page. The code is:

Code:
<h2><strong>Frequently Asked Questions</strong></h2>
<ol>
<li><a href="#faq1"><strong>How much does it cost?</strong></a></li>
<li><strong>What if I don't want my email address published?</strong></li>
</ol>
<p><strong></strong></p>
<ol>
<li><a name="faq1">Nothing!  We offer our site to you for free.</a></li>
<p> </p>
<li><strong>Unless you put your email eddress in your own listing, no one will ever see it.
The thing is, when I paste this code into the TryIt editor @w3schools, it works. So I'm at a loss.

Thanks in advance
__________________
v4.0.9 Designer
island1 is offline   Reply With Quote
Old 01-02-2009, 02:09 PM   #2
Member
 
Mango's Avatar
 
Join Date: Mar 2007
Posts: 18
Rep Power: 15
Mango is on a distinguished road
Default

Try this:

HTML Code:
<li><a href="pages.php?page=7/#faq1"><strong>How much does it cost?</strong></a></li>
Change page=7 to whatever page number your FAQ is.
__________________
Regards,

Mango
v4.0.9
Mango is offline   Reply With Quote
Old 01-02-2009, 02:09 PM   #3
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,034
Rep Power: 60
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Since you didn't give any additional information as to what it actually does do, I'm just poking at straws here.

Try adding a target. like this <a href="#faq1" target="_self">

or try using a full url like this <a href="{$smarty.const.URL}/pages.php?page=X#faq1"> (where X=the page ID you are creating in the admin)

Hope that helps,
-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Old 01-05-2009, 02:16 PM   #4
Member
 
Join Date: Dec 2008
Posts: 55
Rep Power: 9
island1 is on a distinguished road
Default

Quote:
Originally Posted by Mike-N-Tosh
Since you didn't give any additional information as to what it actually does do, I'm just poking at straws here.
By "anchor" I mean a link to within the same page. So when you click on the link at the top, it scrolls down the same page to the anchor link location.
__________________
v4.0.9 Designer
island1 is offline   Reply With Quote
Old 01-05-2009, 02:20 PM   #5
Member
 
Mango's Avatar
 
Join Date: Mar 2007
Posts: 18
Rep Power: 15
Mango is on a distinguished road
Default

My posted advice does just that.
__________________
Regards,

Mango
v4.0.9
Mango is offline   Reply With Quote
Old 01-05-2009, 02:34 PM   #6
curmudgeon
 
Join Date: Mar 2006
Posts: 5,314
Rep Power: 131
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by island1
By "anchor" I mean a link to within the same page. So when you click on the link at the top, it scrolls down the same page to the anchor link location.
As Mangi said, for smarty you will need to change the actual link to include your full path and then append the #labelname to the end of the url.......


so instead of ...

<a href="#faq1">

you will need....

<a href="http://mydomain.com/pages.php?page=6#faq1">
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline   Reply With Quote
Old 07-07-2009, 04:27 AM   #7
Member
 
Join Date: Apr 2009
Posts: 61
Rep Power: 8
JP2 Designs is on a distinguished road
Default

Hi
I have a similar problem with the anchor links...

I want the anchor link to be on the viewlisting.tpl page, so when a guest clicks on my "Contact Seller" link, it anchors/ goes to the form below...

I am thinking that the <a href="#guest">Contact Seller</a> link would need more than just {$smarty.const.URL}, maybe {$smarty.const.URL}/{$entry.link}....

Any ideas??
__________________
Jermayn Parker
v4.1.3 Developer
using deapsea as a template for hack m y own
JP2 Designs is offline   Reply With Quote
Old 07-13-2009, 03:00 AM   #8
Member
 
Join Date: Apr 2009
Posts: 61
Rep Power: 8
JP2 Designs is on a distinguished road
Default

Has anyone got an answer for this?
Or should I just send the guest user to a contact form??
__________________
Jermayn Parker
v4.1.3 Developer
using deapsea as a template for hack m y own
JP2 Designs is offline   Reply With Quote
Old 07-13-2009, 05:00 AM   #9
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,069
Rep Power: 32
bowers01 is on a distinguished road
Default

Quote:
Originally Posted by JP2 Designs
Hi
I have a similar problem with the anchor links...

I want the anchor link to be on the viewlisting.tpl page, so when a guest clicks on my "Contact Seller" link, it anchors/ goes to the form below...

I am thinking that the <a href="#guest">Contact Seller</a> link would need more than just {$smarty.const.URL}, maybe {$smarty.const.URL}/{$entry.link}....

Any ideas??
Do you mean {$smarty.const.URL}/viewlisting.php?view={$view}#guest
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 07-13-2009, 05:09 AM   #10
Member
 
Join Date: Apr 2009
Posts: 61
Rep Power: 8
JP2 Designs is on a distinguished road
Default

Hey thanks a lot bowers01

That works great!
Thanks again
__________________
Jermayn Parker
v4.1.3 Developer
using deapsea as a template for hack m y own
JP2 Designs is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
html help early Templates, HTML, CSS, and Design Help 6 03-08-2007 03:43 PM


All times are GMT -4. The time now is 11:55 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0