Hi Experts
I have a piece of javascript that I use for returning to the previous page so as to give the return link a uniform look. The script is:
function pageReturn() {
document.write("<a href='javascript:history.b
ack(-1)' class='more'>[ Return to the previous page ]</a>")
}
What I would like to do is change the text 'Return to the prevoius page' to something less generic. I would like it to reflect the page that it has just come from.
My pages have a recordset called 'MainContent' and the record I would like to use is called 'SectionContentTitle'. However, taking into consideration the last paragraph it has to be the previous 'SectionContentTitle'. It also has to work within a 'Replace' statement.
If I do:
sContent = Replace(sContent,"<return>
","<script
>pageRetur
n()</scrip
t>")
then the page displays '[ Return to the previous page ]'.
How do I alter this to reflect the changes as outlined above?
Many thanks in advance for your help.
Regards
Martin
Start Free Trial