Click to See Complete Forum and Search --> : Back Button Help
zapdos900
03-11-2003, 07:53 PM
does this code work as a back button?
<script type="text/javascript">
<!--
link_text = "back".bold();
document.write(link_text.link("history.go(-1)"))
// -->
</script>
No, because that set's the actual link to to history.go(-1) rather than setting up a javascript command.
zapdos900
03-11-2003, 08:06 PM
Ok
What about this?
<script type="text/javascript">
<!--
link_text = "back".bold();
document.write(link_text.link("history.go(back)"))
// -->
</script>
Same problem. history.go(-1) works, but not if you set it up the way you did. Try
<script language="javascript" type="text/javascript">
link_text = "back".bold();
document.write('<a href="#" onClick="history.go(-1); return false;">'+link_text+'</a>');
</script>
zapdos900
03-11-2003, 08:31 PM
Thank You
:)