I have a dropdown that I would like to run a script.
Can't seem to get it....
Here is the scripts that I would like to run which passes text from first textbox to the second textbox while appending text->
Here is the dropdown and textboxes->
Currently when I choose the dropdown, my textboxes resets and won't passtext.
thanks for any solutions.
tav
Can't seem to get it....
Here is the scripts that I would like to run which passes text from first textbox to the second textbox while appending text->
Code:
<script language="JavaScript">
<!-- Begin
function passText(str) {
document.myform.select.value = "Where WORKORDER.WONUM in ('" + str + "')";
}
// End -->
</script>
<script language="JavaScript">
<!-- Begin
function passText2(str) {
document.myform.select.value = "Where WORKORDER.LEADCRAFT in ('" + str + "')";
}
// End -->
</script>
Here is the dropdown and textboxes->
Code:
<!-- Form Start -->
<form name="myform">
<!-- First Textbox Start -->
<textarea rows="9" name="user" cols="45" onBlur="this.value = convertSpaces(this.value);"></textarea>
<input type="reset" value="Reset" name="B2">
<!-- First Textbox End -->
<!-- DropDown Start -->
<select name="select1" onChange="document.myform.submit()">
<option>Select one:
<option value= onChange="this.value = passText
(this.form.user.value);">Workorder
<option value= onChange="this.value = passText2
(this.form.user.value);">Leadcraft
</select>
<!-- DropDown End -->
</tr>
</td>
<td width="50%" align="center">
<!-- Second Textbox Start -->
<textarea rows="9" name="select" cols="45"></textarea>
<input type="reset" value="Reset" name="B2
<!-- Second Textbox End -->
</td>
</form>
Currently when I choose the dropdown, my textboxes resets and won't passtext.
thanks for any solutions.
tav