Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
fender said:OK, how about this...
Could it be possible to add '/whatever' to the end of a url? Something like href="/whatever" but without actually taking you there. I'm guessing the answer is no...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Change linky</title>
<script language="javascript" type="text/javascript">
function changeLink(linkID,newURL,newText)
{
document.getElementById(linkID).innerHTML = newText;
document.getElementById(linkID).href = newURL;
}
</script>
</head>
<body>
<a href="#" onclick="changeLink('theLink','http://msn.com','MSN');">Click Here to change the Link</a><br />
<a id="theLink" href="http://cnn.com">CNN</a>
</body>
</html>
fender said:Thanks for the reply but I think you misunderstood me. When you click a link like this
<a href="#link">click me</a>
the URL in the navbar becomes http://localhost/link.html#link and no new page is loaded. What I want is the same thing to happen, but instead of having '#link', I would like to have '/link'. I'm 99% sure this can't be done since having '/link' appended to the end of the url will automatically take you to that location.
fender said:Thanks for the reply but I think you misunderstood me. When you click a link like this
<a href="#link">click me</a>
the URL in the navbar becomes http://localhost/link.html#link and no new page is loaded. What I want is the same thing to happen, but instead of having '#link', I would like to have '/link'. I'm 99% sure this can't be done since having '/link' appended to the end of the url will automatically take you to that location.
maxedoutcc said:take out the href property of the anchor tag
<a onclick="javscript....">click me</a>
<body onload=""> ?maw said:you missed the point too. i believe he wants the url to change in the address bar of the browser when he clicks on it. though he calls it the navbar, which is a little bit confusing.