???
And so why not simply use
Code:
<a href="localhost/OrderEntry/trainer/7.1.0.73/frameset.html ">Order Entry</a>
Presumbably, you are generating these links with some server-side code (PHP/ASP/JSP/etc.). No? So let the server side code do it.
But if you *must* do it in JavaScript, I guess you could do something like this:
Code:
<a onclick="this.href='localhost/' + this.innerHTML.replace(/\W/g,"") + '/trainer/7.1.0.73/frameset.html'; return true;">
Order Entry
</a>
The call to
replace there will remove all characters except letters, digits, and underlines from the text between the <a> and </a> tags.