A
altergothen
Please help with this basic function - I get an error saying " Object
expected on Line 17"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Basic if else</title>
<script language="JavaScript">
var teststring;
function myregex(teststring){
if(teststring=="test"){
alert("Match found! in " + teststring);
} else {
alert("No match found in " + teststring);
}
</script>
</head>
<body>
<form>
<input type="button" value="click me" onClick="myregex('test')">
</form>
</body>
</html>
expected on Line 17"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Basic if else</title>
<script language="JavaScript">
var teststring;
function myregex(teststring){
if(teststring=="test"){
alert("Match found! in " + teststring);
} else {
alert("No match found in " + teststring);
}
</script>
</head>
<body>
<form>
<input type="button" value="click me" onClick="myregex('test')">
</form>
</body>
</html>