Jump to content

Using # anchor links problem


zomex

Recommended Posts

Hello everyone,

 

I assume this has something to do with how WHMCS functions but I'd really love to find a solution :)

 

I'm looking to make use of using # to return to the top of the page across my site. The issue is that when I do this on any WHMCS page it reloads the portal home page.

 

So for example I have a simply return to the top of the page link on my submit tickets page:

 

<a href="#">Return to top</a>

 

When I click on this it loads:

 

whmcs/index.php

 

Is there anyway around this or does this have something to do with the base URL?

 

Thanks!

Jack

Link to comment
Share on other sites

Well, we weren't worried, but not posting the solution will leave anyone reading frustrated if they need it too.

Perhaps you could post it?

 

For me, I'd add in a link to the header of any page, in the form of:

element id="linktext"

An example might be:

<table id="textlink"><tr><td>....

Your # link would them need to be href="#textlink" to make that work.

 

What did you use?

Link to comment
Share on other sites

Hello Bear,

 

I apologize. I was looking to resolve this for 2 reasons:

 

1) To bring the user to the top of the page. I've since decided that this isn't too much of a concern on the WHMCS pages but thanks I'm going to your tip for this now.

 

2) I'm using a jQuery slide panel that was using a link with an ID which triggered the effect when clicked. i have since removed the link and applied the id to the <li> tag instead and styled it to match the links that are in the panel so the user can't tell that it's not a link :D

 

Thanks.

Link to comment
Share on other sites

Hello,

 

Once again thanks for both of your suggestions.

 

I tried both methods and both cause the page to refresh unless on /whmcs/ which works. Now even /whmcs/index.php will cause the page to refresh.

 

I believe the reason for this is:

 

<base href="http://www.awebsite.com/whmcs/" />

 

As each page uses the same base URL it always refreshes to that URL when using either method.

 

It would be nice if I could resolve this but I imagine WHMCS requires the base URL to remain the same for each page so I'll probably end up using perhaps a list and then styling it to look like a link.

 

Thanks.

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
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated