posted 17 years ago
I tried your code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script>
window.&o&n&l&o&a&d = function(){
alert("Here");
var url = document.location.href
var dirs = url.split("/");
var page = dirs[dirs.length-1];
[B]Line 12if(indexOf("?")>-1)page = page.split("?")[0];
if(indexOf("#")>-1)page = page.split("#")[0];
document.form1.text2.value = page;
}
</script>
</head>
<body>
<form action="" name="form1">
<input type="text" name="text1"><br>
<input type="text" name="text2"><br>
<input type="text" name="text3"><br>
<input type="submit" name="submit">
</form>
</body>
</html>[/B]
but it is giving error object required at line no 12