I've got the Check Unique Key working, but:
* when a duplicate record is found, it's not displaying my error message; it's displaying the standard error message (which isn't very userfriendly)
Error:
Duplicate record found. There is already an identical record in your database, for the 'Email' field.
function needHelp() { if (confirm('Some data will be submitted to InterAKT. Do you want to continue?')) { var rand = Math.random().toString().substring(3, 10); var wnd = window.open('includes/tng/pub/blank.html', 'KTDebugger_' + rand, ''); try { var doc = wnd.document; } catch(e) { alert('The popup could not be opened. Please configure your pop-up blocker software to allow this.'); return; } var frm = utility.dom.createElement( "FORM", { 'action': 'http://www.interaktonline.com/error/', 'method': 'POST', 'style': "display: none" }, wnd ); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'err', 'value': 'Duplicate record found. There is already an identical record in your database, for the \'Email\' field.'}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'devNotes', 'value': ''}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'os', 'value': ''}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'webserver', 'value': 'Microsoft-IIS/5.0'}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'servermodel', 'value': 'ASP VBScript'}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'installation', 'value': ''}, wnd)); frm.appendChild(utility.dom.createElement('INPUT', {'type': 'hidden', 'name': 'extensions', 'value': ''}, wnd)); setTimeout(function() { wnd.document.body.appendChild(frm); frm.submit(); }, 5); } //return false; }
tNG Execution Trace -
VIEW
- tNG_insert.executeTransaction
-
- STARTER.Trigger_Default_Starter
- tNG_insert.doTransaction
-
- BEFORE.Trigger_Default_FormValidation
- BEFORE.addFields
- BEFORE.Trigger_CheckUnique*
- ERROR.Trigger_Default_Insert_RollBack
- tNG_insert.getRecordset
- tNG_insert.getFakeRsArr
- tNG_insert.getLocalRecordset
- tNG_insert.getFakeRecordset
- tNG_insert.getFakeRecordset
* is it possible to redirect to a different page, rather than show the error message?
Thanks,
Win