G
Guest
I'm working with a .hta file that uses javascript to produce 3checkboxes. If any checkbox is checked, a corresponding text boxappears. I'd like to be able to pass the data entered in thetext boxes to a single memo field in an Oracle db.
The functionality of the .hta is working, but I'm having troublefiguring out how to pass the text to the db. I need to have abutton "Return Values to HEAT" that will take the values enteredinto the text boxes and pass them via the sql statement in thecode below:
<HTML>
<HEAD>
<TITLE>Select Item to Change</TITLE>
<script language="javascript">
<!--
function showDiv(objName) {
obj = document.getElementById(objName);
obj.style.display = (obj.style.display == 'none') ? '' :'none'
}
-->
</script>
</HEAD>
<BODY scroll="no">
<P>
<form name="the_form">
Select Item to Change:
<P>
<input type="checkbox" name="Name_chkbox"onclick="showDiv('Name');">Name
<input type="checkbox" name="Phone_chkbox"onclick="showDiv('Phone');">Phone
<input type="checkbox" name="Address_chkbox" value="0"onclick="showDiv('Address');">Address
<P>
<div id="Name" style="display: none;">
Enter new name: <input type="text" name="Name_text" value=''>
</div>
<BR>
<div id="Phone" style="display: none;">
Enter new phone #: <input type="text" name="Phone_text"value=''>
</div>
<BR>
<div id="Address" style="display: none;">
Enter new address: <input type="text" name="Address_text"value=''>
</div>
<BR>
<P>
<script type="text/vbscript">
strLocalHEAT = "DSN=LocalHEAT;"
Set oArgs = WScript.Arguments
set cnn = createobject("ADODB.Connection")
set cmd = createobject("ADODB.Command")
set rst = createobject("ADODB.Recordset")
SqlStatement = "UPDATE CallLog SET CallDesc = '" & Phone & "'WHERE CallID = '01624117'"
cnn.Open strLocalHEAT
cnn.execute SqlStatement
cnn.close
set cnn = nothing
</script>
<P>
<INPUT TYPE="button" name="ReturnHeat" value="Return Values toHEAT">
<INPUT TYPE="button" name="Cancel" value="Cancel"onClick=window.close()>
</FORM>
</BODY>
</HTML>
User submitted from AEWNET (http://www.aewnet.com/)
The functionality of the .hta is working, but I'm having troublefiguring out how to pass the text to the db. I need to have abutton "Return Values to HEAT" that will take the values enteredinto the text boxes and pass them via the sql statement in thecode below:
<HTML>
<HEAD>
<TITLE>Select Item to Change</TITLE>
<script language="javascript">
<!--
function showDiv(objName) {
obj = document.getElementById(objName);
obj.style.display = (obj.style.display == 'none') ? '' :'none'
}
-->
</script>
</HEAD>
<BODY scroll="no">
<P>
<form name="the_form">
Select Item to Change:
<P>
<input type="checkbox" name="Name_chkbox"onclick="showDiv('Name');">Name
<input type="checkbox" name="Phone_chkbox"onclick="showDiv('Phone');">Phone
<input type="checkbox" name="Address_chkbox" value="0"onclick="showDiv('Address');">Address
<P>
<div id="Name" style="display: none;">
Enter new name: <input type="text" name="Name_text" value=''>
</div>
<BR>
<div id="Phone" style="display: none;">
Enter new phone #: <input type="text" name="Phone_text"value=''>
</div>
<BR>
<div id="Address" style="display: none;">
Enter new address: <input type="text" name="Address_text"value=''>
</div>
<BR>
<P>
<script type="text/vbscript">
strLocalHEAT = "DSN=LocalHEAT;"
Set oArgs = WScript.Arguments
set cnn = createobject("ADODB.Connection")
set cmd = createobject("ADODB.Command")
set rst = createobject("ADODB.Recordset")
SqlStatement = "UPDATE CallLog SET CallDesc = '" & Phone & "'WHERE CallID = '01624117'"
cnn.Open strLocalHEAT
cnn.execute SqlStatement
cnn.close
set cnn = nothing
</script>
<P>
<INPUT TYPE="button" name="ReturnHeat" value="Return Values toHEAT">
<INPUT TYPE="button" name="Cancel" value="Cancel"onClick=window.close()>
</FORM>
</BODY>
</HTML>
User submitted from AEWNET (http://www.aewnet.com/)