iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi support,
sometimes we have the exception in attachment, we would like if we could intercept the throw exception and so on customize the message.
thanks in advanced
Fabrizio
Hello,
You can use your custom form to override/replace the current form created by WebGrid. Try the following code:
function WebGrid1_OnUnhandledError(controlId, tblName, lastRequestObject, errorString) { var grid = ISGetObject(controlId); grid.SetIdle(); grid.IsInProgress = false; grid.SetStatus1("", "ready", "CommonText/Ready") alert("Customize your error message with custom Form"); return false; }
The code above will invoke alert function which will create a dialogbox with a custom message. Therefore, you can use your own custom Form in here.
Hope this helps.
Thank you.
Hello Fabrizio,
You could try to use Try-catch statement in JavaScript.
try { //Run some code here } catch(err) { //Handle errors here }
Hi Martin,
sorry but I have forgot the attachment picture.
I know how to use the Try-catch statement but I don't know where add it to intercet the following exception and the change the error message (in attachment).
I add a new position in the WebGrid and the client is unabled to comunicate with server, now where I can put the your example (Try-catch statement) to catch the exception, in any event ?
I hope that I'm clear
thanks
Use OnUnhandledError Client-side event to catch the exception and put the following code:
function WebGrid1_OnUnhandledError(controlId, tblName, lastRequestObject, errorString) { var WebGrid1 = ISGetObject(controlId); window.setTimeout(function(){ var errorMessage = document.getElementById("wg_ErrorMsg"); errorMessage.innerText = "Customize your error messages";}, 10); return true; }
Thank you Martin,
this the event that I look for but now I don't know replace not only the Message but put our custom form with message, may you tell I can do it.
thanks very much
Thank you, it is OK
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname