BV Commerce Forum
»
BV Commerce Support
»
General Support
»
"Back" button. How to get it to show on custom pages?
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
I've managed to get "Back" to show on my custom pages. The following is added to the top of the page:
<script src="backlink.js" type=text/javascript></script>
The following is added to the place where I need "Back" to show:
<script type=text/javascript> <!-- var gb = new backlink(); gb.text = "BACK"; gb.write(); //--> </script>
This is for sure a noob question.... How can I get the themed "Previous" button to show up? I know where it is... I'm just not up on js syntax.
Thanks. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 1/18/2008(UTC) Posts: 50
|
Hi Mitch,
Does the back button work currently?
Can you share your custom page to see the code?
Which theme are you using?
Dave
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
The 'back' button is currently just the text: BACK as shown in the js code above.
The rest of the page is unimportant, it's just a little HTML and a few pics generated via the ootb free text editor.
Painted Paper. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 1/24/2008(UTC) Posts: 60
|
Use this: Code: <a href="javascript: history.go(-1);"><img src="~/../Images/Samples/ColeAndHarper.png" alt="" /></a>
I haven't actually looked at the backlink.js so I'm not 100% sure exactly what it does, but if you *just* want to go to the last page they were on when they click the button, use the above code. Replace the image with your "previous" button image. |
- Brian Web Developer/IT Manager |
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
Thanks Brian, this works fine.
With the 'Previous" button img file:
<a href="javascript: history.go(-1);"><img alt="" src="~/../BVModules/Themes/Bvc5/images/Buttons/Previous.png"></a>
The free text editor inserts the 'alt=""' whether you use it or not. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
Originally Posted by: "MitchA" The free text editor inserts the 'alt=""' whether you use it or not. You should definitely use it. Just put the word "Back" in there. I'd also put the title attribute in the link with the same. Also, if you're going to use '~/' in your img tag, it has to runat="server"; your image path doesn't look right. Additionally, you need to end the img tag with '/>' since I assume you're theme doctype is XHTML. I don't generally recommend using this back button method, though, since just putting javascript in the link does not allow for graceful degradation at all; the button just won't work if js is disabled. Everyone knows where their browser's back button is, but I can see the benefit for custom information pages that temporarily distract from, say, a product page. Easy, cheap solution, but just a slightly risky one. |
|
|
|
|
Rank: Member
Joined: 3/3/2006(UTC) Posts: 1,737
|
Thanks, "/" in place now.
I was mistaken, the built-in editor didn't insert the alt"", another editor did ...damn defaults... I'm wondering if there is a way to get the BVC editor to stop making <CAPS> when building a custom page and long descriptions. |
Optimists invent airplanes, Pessimists buy parachutes. |
|
|
|
Rank: Member
Joined: 5/24/2004(UTC) Posts: 4,147
|
WYSIWYG seems to do more to create problems than solve them. :/ |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.