I’m trying to change the url of some tag using another one.
Can’t get it to work. Please help.
Here’s my code:
<a href="#" rel="wd" onclick="updateUrl('wd')">Category</a>
<a id="test" href="index.php?path=portfolio/web" class="thumbnail"><img src="img.jpg"></a>
<script type="text/javascript">
function updateUrl(newUrl)
{
document.links["test"].href .= newUrl;
}
</script>
1 Answer