I will invoke a
java script method with arguments 1.form element name and 2.a
String value which has to be assigned to that form element.
Can any one tell me how to do that?
i have done but it is giving error..
eg:--
<html>
<head>
<script type="text/javascript">
function convertText(element,value) {
document.SampleForm.element.value = value;
}
</script>
</head>
<body>
<form name="SampleForm">
<input type="text" name="myText">
<input type="button1" value="Convert" on click="convertText(button1,'Converted')">
<input type="button2" value="Convert" on click="convertText(button2,'Converted')">
<input type="button3" value="Convert" on click="convertText(button3,'Converted')">
<input type="button4" value="Convert" on click="convertText(button4,'Converted')">
</form>
</body>
</html>
i.e. when i click button1.....button1 value must change from convert to Converted..and similarly for other buttons..
which ever button i click its value must change to the value i passed as argument to the method.
[ August 19, 2007: Message edited by: Bear Bibeault ]