hankknight
asked on
Set input value onclick
What is wrong with my code?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Demo</title>
</head>
<body>
<form onsubmit="insertMedia();return false;" action="#">
<input id="src" name="src" type="text" value="" onchange="switchType(this.value);generatePreview();" />
</form>
<div onclick="document.getElementById('src').obj.value = 'hello world'">click here</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
thanks . That was an easy fix