What is wrong here? I am calling this function within a .cfm page, here are my controls and save button:
<td align="left"><input type="text" id="TAG" name="tag" value="#podFieldsGet.PFD_TAG_TXT#" onblur="return convertToUpper(this);" maxlength="16" size="16"></input>
- <input type="text" id="TITLE" name="title" value="#podFieldsGet.PFD_TITLE_TXT#" maxlength="64" size="64"></input></td>
</tr>
<tr><td colspan="2">
<input type="button" name="Save" value="Save" onclick="doSubmitFor2('save',document.editTitleForm,document.editTitleForm.tag,document.editTitleForm.text);">
Here is the script.
function doSubmitFor2(act,doc,cntrl,cntrl2){
alert("HEllo!");
if (act == 'delete'){
if (confirm("Are you sure you want to delete?")){
doc.action.value = 'Delete';
doc.submit();
}
}
else{
alert("we are in else!");
if(cntrl){
alert("we are in cntrl!");
var objValue = new String(cntrl.value);
var obj2Value = new String(cntrl2.value);
alert("objvalue is " +objValue);
alert("obj2Value is " +obj2Value);
The messages show up to the "we are in cntrl!" message, and then stops, nothing happens after that! Is there something wrong with how I am assigning the variables!?!?!?
Thank You!
<td align="left"><input type="text" id="TAG" name="tag" value="#podFieldsGet.PFD_TAG_TXT#" onblur="return convertToUpper(this);" maxlength="16" size="16"></input>
- <input type="text" id="TITLE" name="title" value="#podFieldsGet.PFD_TITLE_TXT#" maxlength="64" size="64"></input></td>
</tr>
<tr><td colspan="2">
<input type="button" name="Save" value="Save" onclick="doSubmitFor2('save',document.editTitleForm,document.editTitleForm.tag,document.editTitleForm.text);">
Here is the script.
function doSubmitFor2(act,doc,cntrl,cntrl2){
alert("HEllo!");
if (act == 'delete'){
if (confirm("Are you sure you want to delete?")){
doc.action.value = 'Delete';
doc.submit();
}
}
else{
alert("we are in else!");
if(cntrl){
alert("we are in cntrl!");
var objValue = new String(cntrl.value);
var obj2Value = new String(cntrl2.value);
alert("objvalue is " +objValue);
alert("obj2Value is " +obj2Value);
The messages show up to the "we are in cntrl!" message, and then stops, nothing happens after that! Is there something wrong with how I am assigning the variables!?!?!?
Thank You!