Form Validation Forum :: Check unique key

This thread was displayed: 94 times


Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.

For more information about the affected products visit: www.interaktonline.com/Support/

View Threaded Show descending
Winifred Day
02-10-2007 02:17:54 GMT +2

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

Back | Reply | Quote | Top
Razvan Racasanu[InterAKT]Adobe Systems Romania staff
02-12-2007 11:35:50 GMT +2

Hello,

Unfortunately, the trigger does not work like this. Your custom error message is displayed below the field and you cannot redirect to a different page.

Regards
Razvan RACASANU

Reply | Quote | Top
© Adobe Systems Romania. All rights reserved.