How to restrict Url Display on Title bar
Hello,
i am creating one site, in which i am having two or three links. when any user clicks on that link, it's url should not be displayed in Title bar & status bar of browser. can we restrict it using server side scripting. I using Asp for server side coding.
please tell me how to do that.
Re: How to restrict Url Display on Title bar
you cannot do this using asp / php as they are server side technologies
i would ask the question in a javascript forum
Re: How to restrict Url Display on Title bar
Well, just add title tags for the first part. You can use JavaScript to change the status bar text. Call the changestat() in the onload sub of the body tag.
Code:
<html>
<title></title>
<script language="JavaScript">
function changestat(){
window.status = "";
setTimeout("changestat()", 100);
}
</script>
<body onload="changestat()">
</body>
</html>
Re: How to restrict Url Display on Title bar
As for the title bar, simply using the <title>Title here</title> tags changes the title of the page to something like:
"CodeGuru Forums - How to restrict Display on the Title bar - Microsoft Internet Explorer"
"CodeGuru Forums - How to restrict Display on the Title bar - Mozilla Firefox"
using peejavery's technique, you can change the status bar text with ease. Alternatively, you can change it once the page finished loading:
Code:
<script type="text/javascript">
onload = function() {
window.status = "";
}
</script>
Re: How to restrict Url Display on Title bar
Quote:
Originally Posted by Dr. Script
Alternatively, you can change it once the page finished loading
Do remember that there are many sites that have scripts changing the status after moving over a link and then returns the website URL onmouseout. This is why I suggest using setTimeout().
Dr. Script, can you move this to the Scripting Client Side forum? I think it belongs there.
Re: How to restrict Url Display on Title bar
I misunderstood your script ... I had seen it as the setTimeout an attempt to avoid the error of starting the timer before page loaded which could lead in an error. I didn't notice that the function was called from the onload event handler, nor did I realize that it was a function at all ... my mistake.
I did intend to move it ... just I apparently forgot ... thanks, done.