I have a simple Javascript function which builds a Url that I want to provide a link to.
However, I can’t seem to get the anchor tag working with it. How do I assign the href of the anchor tag the results of the Javascript function?
Neither one of these work correctly:
<a href="getUrl();">Click here</a>
<a href="javascript:getUrl();">Click here</a>
This is what I want to accomplish.
— update —
If I wanted to incorporate user278064s’ comments, i would change the above into: