zomex Posted February 5, 2011 Share Posted February 5, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 5, 2011 Author Share Posted February 5, 2011 No need to worry now, I've found a workaround 0 Quote Link to comment Share on other sites More sharing options...
bear Posted February 5, 2011 Share Posted February 5, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 5, 2011 Share Posted February 5, 2011 You actually need to use the name element http://www.w3schools.com/HTML/html_links.asp http://www.w3schools.com/HTML/tryit.asp?filename=tryhtml_link_locations 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 5, 2011 Author Share Posted February 5, 2011 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 Thanks. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 5, 2011 Author Share Posted February 5, 2011 Thanks Sparky. I use this on my terms of service page but always assumed that # was a default way to jump to the top of the page. I'll apply a name to the body or header and see how that works out. Jack 0 Quote Link to comment Share on other sites More sharing options...
bear Posted February 5, 2011 Share Posted February 5, 2011 You actually need to use the name element Using the name element leaves whatever you wrap it around as a live link, often including an underline and other undesirable bits. Using the ID is syntactically valid, and suffers none of that. Try it here: http://67.222.137.24/foolinks.html 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 6, 2011 Share Posted February 6, 2011 Either way will work... probably what I should have said was the original html way to do it was with the name element. All good 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 6, 2011 Author Share Posted February 6, 2011 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.