• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

MitchA
#1 Posted : Tuesday, April 8, 2008 11:27:15 AM(UTC)
MitchA

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.
casti004
#2 Posted : Tuesday, April 8, 2008 4:14:14 PM(UTC)
casti004

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
MitchA
#3 Posted : Tuesday, April 8, 2008 6:51:40 PM(UTC)
MitchA

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.
avmwebguy
#4 Posted : Wednesday, April 9, 2008 9:18:31 AM(UTC)
avmwebguy

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
MitchA
#5 Posted : Saturday, April 12, 2008 11:38:33 AM(UTC)
MitchA

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.
Cliff
#6 Posted : Saturday, April 12, 2008 3:41:34 PM(UTC)
Cliff

Rank: Member

Joined: 5/24/2004(UTC)
Posts: 4,147

Originally Posted by: "MitchA" Go to Quoted Post
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.
MitchA
#7 Posted : Saturday, April 12, 2008 7:22:25 PM(UTC)
MitchA

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.
Cliff
#8 Posted : Sunday, April 13, 2008 6:00:32 PM(UTC)
Cliff

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.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012