battleangela
Technical User
Hi
I am new to writing java script and wanted to test things out. I started with a simple rpogram to load and display a function. I keep getting an error when I press the button and don't know what wrong. Can someone take a look and see whats wrong ?
<html>
<head>
<title>OpenObject Data</title>
<script language="javascript">
function displaytext()
{
document.getElementById('targetDiv').innerHTML="This message is brough you by javascript";
}
</script>
</head>
<body>
<h1>
Using a button to display results</h1>
<form>
<input type="button" onclick="displayText()" value="Click Me"/>
</form>
<div id="targetDiv">
</div>
</body>
</html>
I am new to writing java script and wanted to test things out. I started with a simple rpogram to load and display a function. I keep getting an error when I press the button and don't know what wrong. Can someone take a look and see whats wrong ?
<html>
<head>
<title>OpenObject Data</title>
<script language="javascript">
function displaytext()
{
document.getElementById('targetDiv').innerHTML="This message is brough you by javascript";
}
</script>
</head>
<body>
<h1>
Using a button to display results</h1>
<form>
<input type="button" onclick="displayText()" value="Click Me"/>
</form>
<div id="targetDiv">
</div>
</body>
</html>