Hello,
I have recently found a script I would like to use. If that’s not too much trouble then please try this script to see what it does and please tell me how can I make it compatible with other browsers other than IE. Or could you please give me another script like that one which is compatible at least with a couple of other major browsers.
It works perfectly on IE. I have tested it on Firefox also, and it didn’t work…
Thank you in advance.
[CODE]<html>
<HEAD>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function writeLayer(text) {
document.frames[‘myFrame’].location.href = text;
document.addrForm.location.value = text;
}
function setLayer(text) {
if (text.indexOf(“http://”,0) <= 0)
text = “http://” +text;
document.frames[‘myFrame’].location.href = text;
document.addrForm.location.value = text;
}
function onLoad(text) {
if (text != “Microsoft Internet Explorer”) {
alert(“netscape not supported”);
history.back();
}
return true;
}
// End –>
</script>
</HEAD>
<BODY onLoad=”onLoad(navigator.appName)”>
<iframe src=”about:blank” width=100% height=90% id=myFrame></iframe>
<center>
<form name=addrForm>
<input type=button value=”Google” onClick=”writeLayer(‘http://www.google.com’)”>
<input type=button value=”Yahoo” onClick=”writeLayer(‘http://www.yahoo.com’)”>
<input type=button value=”etc…” onClick=”writeLayer(‘about:blank’)”>
Location:
<input type=text name=location value=”Type any URL here then press Go” onFocus=”this.value=”” size=35>
<input type=button value=”Go” onClick=”setLayer(document.addrForm.location.value)”>
</form>
</center>
</body>
</html>