...

View Full Version : Is it possible to insert text with a link?



mattt
12-29-2005, 05:47 AM
I am trying to find a way to create text in a textbox by clicking on a picture. I have been trying with onClick but i have not found any results. I was wondering if anyone could assist me.

_Aerospace_Eng_
12-29-2005, 05:54 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function loadText(what,where){
document.getElementById(where).value=what;
}
//-->
</script>
</head>

<body>
<img src="image1.jpg" onclick="loadText('this is text','thebox')" alt=""><br>
<img src="image2.jpg" onclick="loadText('this is also text','thebox2')" alt=""><br>
<img src="image3.jpg" onclick="loadText('this is more text','thebox3')" alt=""><br>
<form action="#" method="post">
<input type="text" name="thebox" id="thebox"><br>
<input type="text" name="thebox2" id="thebox2"><br>
<input type="text" name="thebox3" id="thebox3">
</form>
</body>
</html>

mattt
01-02-2006, 06:30 AM
thank you much :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum