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="javas cript">
<!--
function showDiv(objName ) {
obj = document.getEle mentById(objNam e);
obj.style.displ ay = (obj.style.disp lay == 'none') ? '' :'none'
}
-->
</script>
</HEAD>
<BODY scroll="no">
<P>
<form name="the_form" >
Select Item to Change:
<P>
<input type="checkbox" name="Name_chkb ox"onclick="sho wDiv('Name');"> Name
<input type="checkbox" name="Phone_chk box"onclick="sh owDiv('Phone'); ">Phone
<input type="checkbox" name="Address_c hkbox" value="0"onclic k="showDiv('Add ress');">Addres s
<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_tex t"value=''>
</div>
<BR>
<div id="Address" style="display: none;">
Enter new address: <input type="text" name="Address_t ext"value=''>
</div>
<BR>
<P>
<script type="text/vbscript">
strLocalHEAT = "DSN=LocalHEAT; "
Set oArgs = WScript.Argumen ts
set cnn = createobject("A DODB.Connection ")
set cmd = createobject("A DODB.Command")
set rst = createobject("A DODB.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="ReturnHea t" value="Return Values toHEAT">
<INPUT TYPE="button" name="Cancel" value="Cancel"o nClick=window.c lose()>
</FORM>
</BODY>
</HTML>
User submitted from AEWNET (http://www.aewnet.com/)