SteveFerraro Posted April 7, 2014 Report Share Posted April 7, 2014 Hello all!! If a datapage is submitting data from a text box to a field in a table that is unique and the data is not unique does the datapage set a flag or fire an event that javascript code can interrogate or react to? Any advice will be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
SteveFerraro Posted April 9, 2014 Author Report Share Posted April 9, 2014 Figured this out myself but if anyone is looking to do this, here it is. When a submission datapage is in an error state the pages HTML contains a paragraph <p> with a class attribute of "cbFormError". All you need to do is search for the existence of this class attribute in the paragraph and you will know whether the previous submit failed or succeeded. Here's the JavaScript to do that; place it in an HTML Footer: function lookforerror() } var v_elements = document.getElementsByTagName("p"); for (var i = 0; i < v_elements.length; i++) { if (v_elements.className == "cbFormError") { return 1; } } return 0; } The function returns 1 if the page is in an error state and 0 if not. Enjoy!!! jonathanr 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.