Alpha Video Training
Page 1 of 2 12 LastLast
Results 1 to 30 of 43

Thread: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

  1. #1
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Post $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    No answers received through response #13, below. If you know the answer, please reply!

    Scenario
    1. A dialog exists with several fields on it.
    2. A user must scroll the dialog vertically to access all fields on the dialog.
    3. Some fields on the dialog are validated using 'Validation rules'. One field is validated using 'Validation Xbasic'.
    4. 'Dialog Properties > Validation and Error Reporting > Error style' = "Tip".
    5. There is a 'Submit' button at the bottom of the dialog.

    The Problem
    1. The user enters data on the dialog.
    2. The user leaves at least one field invalid (e.g., it's left blank).
    3. The user clicks 'Submit'.
    4. Fields with validation errors are highlighted but the user does not see them because the invalid fields have scrolled off the screen.

    What I Want to Happen
    • Excellent Solution: The dialog scrolls to the first invalid field, that field is given focus, and the error message appears in an alert.
    • Very Good Solution: The dialog scrolls to the first invalid field and that field is given focus.
    • Good Solution: The dialog scrolls to the first invalid field.
    • Fair Solution: 'Dialog Properties > Validation and Error Reporting > Show message on Dialog if it has field validation errors' = "True" and the dialog scrolls to the top to display the value of 'Dialog Properties > Validation and Error Reporting > Show message on Dialog if it has field validation errors'.
    • Acceptable Solution: Anything that actively and clearly informs the user that there are errors on the dialog.

    Please: do not guess, speculate, make cracks, or admonish me to write javascript validation formulas.
    Last edited by lsprowls; 01-22-2013 at 09:56 PM.

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,643

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Does this qualify?

    See image...

    Dialog validation errors.gif


    P.S. You have a lot of rules.

  3. #3
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Hi Lawrence,

    The first thing I would suggest is you change the design of the dialog so the user does not need to scroll. Use Tabs if there are that many fields.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #4
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Answer to Mr. Greulich: No.
    Answer to Mr. Hubert: I don't want to change the dialog design.

  5. #5
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,308

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Ouch! Somebody needs a Snickers bar.

  6. #6
    Member -Jinx-'s Avatar
    Real Name
    Jinx
    Join Date
    Jul 2012
    Location
    Wisconsin
    Posts
    963

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Is a joke that's not at your expense considered a making a crack? You know, since I'm making fun of users in general I figured it would be OK. And I just can't help myself.

    Plus has anyone made an ajax callback joke before?

    If you don't want to read it you don't have to highlight the below

    Here's the answer to all user complaints....plus you can put it in

    function doesUserHaveAClue as c (e as p)
    dim cmd as C
    dim cn as SQL::Connection
    dim args as SQL::Arguments
    args.add("currentuser",a5ws_getcurrentuser())
    cn.open("::Name::CONNECTION")
    dim sqlCommand as c = "SELECT * FROM users WHERE Clue > 0 AND User = :currentuser"
    if cn.Execute(sqlCommand,args)then (it won't matter because no rows will be returned)
    else cmd = "alert('+ js_escape(cn.CallResult.text) + "User has no clue"');"
    end if
    doesUserHaveAClue = cmd
    end function

  7. #7
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Mr. Cone and Mr. Jinx: Since you don't have the answer, stop wasting my time (and that of everybody who reads this thread) by posting. And don't reply.

  8. #8
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Mr. Cone and Mr. Jinx: Since you don't have the answer, stop wasting my time (and that of everybody who reads this thread) by posting. And don't reply.
    Lawrence,

    I believe you have grossly underestimated the folks who respond or read the threads on the message board. Life w/o humor is too serious and too serious a life may cause physical ailments. Hmmm, I think it says somewhere that "laughter is good for the soul". On a more serious note, you may have alienated those who either have responded or are yet to read this thread. No doubt, you'll probably consider this post a waste of your time as well. If so, Es una Lastima!!
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  9. #9
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Mr. Cone and Mr. Jinx: Since you don't have the answer, stop wasting my time (and that of everybody who reads this thread) by posting. And don't reply.
    Lawrence,

    I believe you have grossly underestimated the folks who respond or read the threads on the message board. Life w/o humor is too serious and too serious a life may cause physical ailments. Hmmm, I think it says somewhere that "laughter is good for the soul". On a more serious note, you may have alienated those who either have responded or are yet to read this thread. No doubt, you'll probably consider this post a waste of your time as well. If so, Es una Lastima!!
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  10. #10
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,381

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    For only $25, without seeing the dialog in question, I'd rather donate the time to
    solving the problem of someone that gives enough information to come up with an answer.

  11. #11
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Anybody who has an answer to my question, please post it! Ignore entries #2-10, above, and #12 below. Earn $25!
    Last edited by lsprowls; 01-22-2013 at 09:52 PM.

  12. #12
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,611

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Anybody who has an answer to my question, please post it! Ignore entries #2-10, above. Earn $25!
    Lawrence

    You made two mistakes in the same thread.

    Consider removing your comment from post 11. Probably too late for the other post to be removed by you, but it can be removed by a moderator.

    In the meantime I suggest this reading for you.

    The reading would prove more valuable than a comical offer of a paltry sum.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  13. #13
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Anybody who has an answer to my question, please post it! Ignore entries #2-10, above. Earn $25!
    Telling people to ignore something is the same as saying sic'em to a dog! man this is getting better by the post. I haven't had entertainment like this in a long, long time. Even though it's sad, it's also making me With that, I'll [try] to refrain from further chatter.
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  14. #14
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,296

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Shooting for acceptable here...

    Submit button onClick:
    Code:
    A5.msgBox.show('Saving Record','<div style=\'padding: 20px;\'><img src=\'CSS/A5System/Images/waitsave1.gif\' />Please Wait - Validating and Saving Record...</div>','none',function() {});
    {dialog.Object}.submit();
    Client-Side afterValidate:
    Code:
    if (e.hasErrors) {
    	A5.msgBox.show('Warning','<div style=\'padding: 20px;\'><img src=\'validationerror.png\' />There was a validation error saving.  Close this notice and look for validation errors to correct.</div>','none',function() {});
    } else {
    	A5.msgBox.hide();
    }
    You can obviously replace the images and wording of the messages in these.

    And for what it's worth, I would've balked at the money and said I've gotten a lot more than $25 worth of code, design, and ideas from the forum from generous folks, but I figure it can't hurt to take your money and send it on to a charitable organization. You could've gotten the answer from me for free, but your attitude toward others here likely would have discouraged my sharing, so the $25 is probably the only thing that got you your answer.
    Last edited by christappan; 01-22-2013 at 11:42 PM.

  15. #15
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    600

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Add this to the dialog's dialogValidate server side event and check the box in the dialog's "Submit dialog if has client-side validation errors" property. I believe it meets all the criteria for excellent.

    Code:
    if e.rtc.a_fieldValidationErrors.size() > 0
    	dim errorcontrol as c
    	dialogValidate.hasError = .t.
    	dialogValidate.errorText = e.rtc.a_fieldValidationErrors[1].errorText
    	errorcontrol = upper(e.rtc.a_fieldValidationErrors[1].varName)
    	e.javascript = "{dialog.Object}.setFocus('"+errorcontrol+"');alert('"+e.rtc.a_fieldValidationErrors[1].errorText+"');"
    end if
    The code above will move the focus to the first control that has an error in it and pop up an alert with the error text that was defined for the control. Even if the control is on a tab pane that is hidden.
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    jimcoltz@a5customsolutions.com

  16. #16
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,296

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    I haven't tested this, but assuming it works anything like your calendar component, I think you're the winner. :)

  17. #17
    "Certified" Alphaholic
    Real Name
    Andy Gill
    Join Date
    Jul 2011
    Location
    Barbados
    Posts
    1,028

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Just seeing this post for the first time and giggling. I am surprised that anyone responded after the first few insults. Great sport.
    I hope you get paid, Jim.
    Last edited by agillbb; 01-25-2013 at 11:35 AM.

  18. #18
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,296

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Jim's already setup to take PayPal payments so there shouldn't be any good reason why not...

    BTW Jim, this code is an incredible step up from mine and just might be integrated lots of places in my app. Thanks for sharing.

  19. #19
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Better get permission from cuz if Lawrence pays $25 for it, does he have the rights to it?
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  20. #20
    Member jaryder's Avatar
    Real Name
    Jeff Ryder
    Join Date
    May 2006
    Location
    Two Harbors, MN
    Posts
    349

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Mr. Cone and Mr. Jinx: Since you don't have the answer, stop wasting my time (and that of everybody who reads this thread) by posting. And don't reply.
    WOW. Read through this and could not believe the attitude. I guess since he is willing to pay for it that he thinks he can have an attitude towards people. I guess he does not realize that the next time he has a question that one of the people that he has pissed off may be the one with the answer.
    Jeff Ryder

  21. #21
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,296

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    So I still haven't tested this code but it looks good--Lawrence, did Jim get your $25?

  22. #22
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    600

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by christappan View Post
    So I still haven't tested this code but it looks good--Lawrence, did Jim get your $25?
    I haven't seen a payment yet from Lawrence, but for those of you who do appreciate the code here's an update that uses a much nicer A5 window instead of those pesky javascript alerts. It comes from my calendar application and was created by using A5's examples. The main advantages over using a js alert are the alert's appearance is browser dependent and can be blocked. This code uses the style of the component for the pop up window and won't trigger the popup blocker. If you study the code you'll see you can add more buttons, add functions to those buttons, or turn them off. Add animation, toolbar buttons, etc.

    Code:
    if e.rtc.a_fieldValidationErrors.size() > 0
    	dim js as c
    	dim errorcontrol as c
    	errorcontrol = upper(e.rtc.a_fieldValidationErrors[1].varName)
    	js = <<%txt%
    					var pagename = "none";
    					var windowtitle = "Validation Error"
    					var windowid = '_valerror'; 
    					var btns = {};
    					btns['items'] = [
    					{
    						html: '',
    						name: 'x',
    						action: '',
    						disabled: false,
    						show: false},
    					{
    						html: '',
    						name: 'y',
    						action: '',
    						disabled: false,
    						show: false},
    					{
    						html: '',
    						name: 'z',
    						action: '',
    						disabled: false,
    						show: false},
    					{
    						html: 'OK',
    						name: 'zz',
    						action: function(){
    							this.hide();
    							
    						},
    						disabled: false,
    						show: true}
    					];
    					//btns['style'] = 'display:none;'; //uncomment to hide buttons.
    					btns['style'] = '';
    					var popupparms = {
    						type: 'modal-resizable',
    						width: '',
    						height: '',
    						bct: 'blank',
    						dbtns: btns,
    	%txt%
    
    	js = js + crlf() + "pmsg: "+"'<p style=\"margin: 10px;\"> " + e.rtc.a_fieldValidationErrors[1].errorText +"</p>'" + crlf()
    
    	js = js + <<%txt%
    						
    					};
    					jqcalPopUpWindow(pagename, windowtitle, windowid, popupparms);
    
    	function jqcalPopUpWindow(pagename, windowtitle, windowid, popupparms)
    	{
    		window.jqcal_popupwin = A5.PageWindows.createWindow(windowid, popupparms.type,
    		{
    			height: popupparms.height,
    			width: popupparms.width,
    			title: {
    				html: windowtitle,
    				tools: {
    					//items: false //uncomment if you don't want an X for closing the window in the title.
    				},			
    				location: 'top'
    			},
    			disableMove: false,
    			theme: '{grid.style}',
    			body: {
    				content: {
    					type: popupparms.bct,
    					url: '__workingMessage.a5w',
    					elementId: '~'
    				},
    				style: ''
    			},
    			onHide: function ()
    			{
    				return;
    		
    			},
    			//animation: {
    			//	show: {
    			//		type: 'fade',
    			//		duration: 'slow'
    			//	},
    			//	hide: {
    			//		type: 'fade',
    			//		duration: 'slow'
    			//	}
    			//},
    			buttons: popupparms.dbtns //need to add comma here if using options below.
    			/*optional top bar, bottom bar, header and footer. Uncommnet to use if desired.
    				tbar: {
    					show: false,
    					html: 'Top Bar',
    					style: ''
    				},
    				bbar: {
    					show: false,
    					html: 'Bottom Bar',
    					style: ''
    				},
    				header: {
    					show: false,
    					html: 'Header',
    					style: ''
    				},
    				footer: {
    					show: false,
    					html: 'Footer',
    					style: ''
    				}
    			*/
    		});
    		if (pagename != 'none')
    		{
    			$(jqcal_popupwin.getWindowId('body')).src = '__workingMessage.a5w';
    			jqcal_popupwin.show();
    			$(jqcal_popupwin.getWindowId('body')).src = pagename;
    		}
    		else
    		{
    			var currWindow = A5.PageWindows.getWindow(windowid);
    			var windowDiv = currWindow.getWindowId('body');
    			var arrHTML = [];
    			arrHTML.push('<p> </p>');
    			arrHTML.push('<p><strong>');
    			arrHTML.push(popupparms.pmsg);
    			arrHTML.push('</strong></p>');
    			arrHTML.push('<p></p>');
    			var windowHTML = arrHTML.join('\n');
    			$(windowDiv).innerHTML = windowHTML;
    			//$(windowDiv).innerHTML = popupparms.pmsg;
    			currWindow.show();
    		}
    	}
    	
    	%txt%
    
    	dialogValidate.hasError = .t.
    	dialogValidate.errorText = "Form has Validation Errors"
    	e.javascript = "{dialog.Object}.setFocus('"+errorcontrol+"');" + crlf() + js
    	
    end if
    Jim Coltz
    Alpha Custom Database Solutions, LLC
    A5CustomSolutions.com
    jimcoltz@a5customsolutions.com

  23. #23
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Pretty COOL, Jim,

    I think that should be worth 5-10 times more than the $25 in that you went above and beyond the advertised specs.
    Last edited by forskare; 01-29-2013 at 10:36 AM.
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  24. #24
    Member
    Real Name
    Christopher Garside
    Join Date
    Dec 2008
    Location
    Sabah, Malaysia
    Posts
    142

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Great solutions Jim and Chris, thank you for sharing.

  25. #25
    Member totallycovered's Avatar
    Real Name
    Derek Schaefer
    Join Date
    Jun 2010
    Location
    Orlando, FL
    Posts
    121

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Wow, this is gold! I'd been struggling to get enhanced validation notifications for a while. I haven't tried the code yet, but I have it saved. If it doesn't work, you can send $25 to my paypal account for wasting my time, heh. Seriously though, thank you guys.

  26. #26
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by totallycovered View Post
    Wow, this is gold! .......... If it doesn't work, you can send $25 to my paypal account for wasting my time, heh.
    Ahhh, but look at the fun you've had doing it. LL And to think it's all because Lawrence wanted/s to pay someone $25 to help him accomplish a task. Will we ever know if this met his criteria and if not, how short is it? Does it do some of what he wants or is the $25 a great bargain?

    I don't have a use for it at this point but if someone does, let us know so Lawrence can be thanked for starting this thread even though he might think it is/was a waste of his time. So Lawrence, please realize that the requests and answers posted here benefit far more than the poster and/or the responder. Even though it may not help you, we do not believe it is/was a waste of your time.
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  27. #27
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Response to #14:
    a) If a record is saved quickly, the message displayed by the the onClick script flashes. Users may find this disconcerting as they will not have time to read the message.
    b) The afterValidate script correctly displays a message if any field on the form contains an error, however the cursor remains at the bottom of the form so the user may not see the error(s). I modified the script to scroll the form to the top to force the user to scroll down through the form and see the errors.

    Code:
    if (e.hasErrors) {
    	self.scrollTo(0,0);
    	A5.msgBox.show('Erreur','<div style=\'padding: 20px;\'>Il y a une erreur sur le formulaire.</div>','o',function() {});
    }
    Response to #15:

    The fields in the dialog are grouped into frames. On error, the window scrolls to unexpected positions. Examples:
    • If the first frame contains errors, the window scrolls to that frame's last, not first, row of erroneous fields.
    • If the fields in the last row of the first frame are valid but the second frame contains errors, the windows scrolls to the last row of the second frame even though higher rows in both frames one and two contain erroneous fields.
    • Only when all other fields are valid, does the window scroll to the first field in the dialog when it contains errors.

    Erroneous fields are often hidden from the user because they have scrolled off the screen.

    Response to #22:
    Same as #15.

  28. #28
    "Certified" Alphaholic
    Real Name
    Chris Tappan
    Join Date
    Jun 2009
    Location
    Marietta, GA
    Posts
    1,296

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Did you pay Jim? Your original post allowed for "Acceptable" solutions, and his was far more than "Acceptable".

    Otherwise, you've only been rude and now that you've finally responded weeks later to one "Acceptable" solution and one far-better-than-"Accpetable"-even-if-it-remains-below-your-perfect-standards solution (while your pre-"Acceptable" solutions were given negative responses within hours), you still only offered criticism without any appreciation for anyone's effort.

    I wish you the best. If you haven't paid Jim, you've proven yourself a liar on top of rudeness; regardless, no one wants to hear you complain anymore.

  29. #29
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    Quote Originally Posted by lsprowls View Post
    Response to #14:
    a) If a record is saved quickly, the message displayed by the the onClick script flashes. Users may find this disconcerting as they will not have time to read the message.
    b) The afterValidate script correctly displays a message if any field on the form contains an error, however the cursor remains at the bottom of the form so the user may not see the error(s). I modified the script to scroll the form to the top to force the user to scroll down through the form and see the errors.

    Code:
    if (e.hasErrors) {
    	self.scrollTo(0,0);
    	A5.msgBox.show('Erreur','<div style=\'padding: 20px;\'>Il y a une erreur sur le formulaire.</div>','o',function() {});
    }
    Response to #15:

    The fields in the dialog are grouped into frames. On error, the window scrolls to unexpected positions. Examples:
    • If the first frame contains errors, the window scrolls to that frame's last, not first, row of erroneous fields.
    • If the fields in the last row of the first frame are valid but the second frame contains errors, the windows scrolls to the last row of the second frame even though higher rows in both frames one and two contain erroneous fields.
    • Only when all other fields are valid, does the window scroll to the first field in the dialog when it contains errors.

    Erroneous fields are often hidden from the user because they have scrolled off the screen.

    Response to #22:
    Same as #15.
    Lawrence,

    Perhaps you could post an example zip file so we could see what it's doing. That would be fair, would it not?
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

  30. #30
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,846

    Default Re: $25 for the Best Answer for Active Display of Dialog Field Validation Errors!!

    I don't have the answer but this thread is very entertaining .... subscribed!

    -Mike

Similar Threads

  1. Display value of a field on a dialog that has been changed by an xBasic code
    By YigalAyalon in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 09-07-2012, 12:04 PM
  2. Highlight Tabs Containing Field Validation Errors
    By floyd in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 12-08-2010, 10:06 AM
  3. Formatting display of number field in a dialog
    By drgarytraub in forum Application Server Version 8
    Replies: 6
    Last Post: 04-28-2008, 08:39 PM
  4. Help with Grid Validation Template for Reporting Errors
    By rjonas in forum Web Application Server v7
    Replies: 0
    Last Post: 10-04-2006, 12:07 AM
  5. customize 'validation errors'
    By Sieward in forum Web Application Server v7
    Replies: 6
    Last Post: 02-18-2006, 08:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •