Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    This thread wins my award for "most entertaining!!!"

    If life were as simple as offering a $25 reward, I'd post " ... how do i get my handicap down to 8?"

    note: and "get a pencil with an eraser" is not an acceptable answer!

    Comment


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

      Steve,

      Ahh, com'on now. You know the rules. Ya gotta offer $$ or you can't ask a question. Offer some $$ and you'll get any handicap you desire.
      TYVM :) kenn

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

      Comment


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

        Member Status: 0 Friends says it all. - Great work - thanks Jim.
        Insanity: doing the same thing over and over again and expecting different results.
        Albert Einstein, (attributed)
        US (German-born) physicist (1879 - 1955)

        Comment


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

          I would pay $100 to anyone that comes up with a good answer and DOESN'T post it on this thread.

          I won't because that would be insulting to everyone that has ever attempted to help me in the past. I appreciate the community and guidance that this board has provided for many years.

          $25 is about 15 minutes worth of time from anyone knowlegeable enough to provide an answer. Don't sell yourself short.
          Thanks,

          Roderick Silva
          rodericksilva@gmail.com

          About Me: rodericksilva.com
          Twitter: rodericksilva

          Comment


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

            Originally posted by Jim Coltz View Post
            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

            I've been playing with this code all morning but I just can't make it work, but I really, really, want it to. The popup window never comes up although my dialog doesn't submit if there are validation errors.
            Since it's Jim's code, odds are definitely that it's something I'm doing wrong.

            Here's my setup, if anyone can offer any suggestions:

            Validation Properties.jpg

            Date Properties.jpg , Date Validation Rules.jpg
            Alpha Anywhere v12.4.6.2.4 Build 7040-5530 IIS v10.0 on Windows Server 2019 Std in Hyper-V

            Comment


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

              $25? And how much will this chap (ess) be getting for the job?
              I got a bit annoyed at the arrogant replies earlier. Decided that calling him/her a wnaker would bring me down to that level.
              Ho Hum, ban me.
              Ted Giles
              Example Consulting - UK
              .

              sigpichttp://ec12.example-software.com//
              See our site for Alpha Support, Conversion and Upgrade.

              Comment


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

                I tested this with a simple test case and it worked. On looking over your settings I set up a dialog with a date field and used your settings for the validation. I then got an error.

                There are some characters in the error text that A5 generates that are wreaking havoc with the JavaScript.

                Replace the line:
                Code:
                js = js + crlf() + "pmsg: "+"'<p style=\"margin: 10px;\"> " +e.rtc.a_fieldValidationErrors[1].errorText +"</p>'" + crlf()
                with:
                Code:
                js = js + crlf() + "pmsg: "+"'<p style=\"margin: 10px;\"> " +js_escape(e.rtc.a_fieldValidationErrors[1].errorText) +"</p>'" + crlf()
                Jim Coltz
                Alpha Custom Database Solutions, LLC
                A5CustomSolutions.com
                jimcoltz@a5customsolutions.com

                Comment


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

                  Originally posted by Jim Coltz View Post
                  I tested this with a simple test case and it worked. On looking over your settings I set up a dialog with a date field and used your settings for the validation. I then got an error.

                  There are some characters in the error text that A5 generates that are wreaking havoc with the JavaScript.

                  Replace the line:
                  Code:
                  js = js + crlf() + "pmsg: "+"'<p style=\"margin: 10px;\"> " +e.rtc.a_fieldValidationErrors[1].errorText +"</p>'" + crlf()
                  with:
                  Code:
                  js = js + crlf() + "pmsg: "+"'<p style=\"margin: 10px;\"> " +js_escape(e.rtc.a_fieldValidationErrors[1].errorText) +"</p>'" + crlf()
                  Jim, you never cease to amaze me my friend

                  There it is .. working now! Thank you, this is awesome!

                  Custom Validation.jpg
                  Alpha Anywhere v12.4.6.2.4 Build 7040-5530 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


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

                    Thank you Stephen. For the purists that want things to be complete you can add a strtran() in there to preserve the line breaks that A5 is adding between the two messages.
                    Code:
                    js_escape(strtran(e.rtc.a_fieldValidationErrors[1].errorText,crlf(),"</br>"))
                    9-18-2013 8-18-23 PM.png
                    Jim Coltz
                    Alpha Custom Database Solutions, LLC
                    A5CustomSolutions.com
                    jimcoltz@a5customsolutions.com

                    Comment


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

                      Surprised anyone replied to this guy.
                      Rotten attitude that shouldnt be rewarded
                      Scott Moniz - Computer Programmer/Analyst
                      REA Inc.
                      http://reainc.net
                      (416)-533-3777
                      scott@reainc.net

                      REA INC offers consulting services, programming services, systems design, database design, third party payment gateway integration (CHASE, PAYPAL, AUTHORIZE.NET) and developer support.
                      If you need custom code, or 1-to-1 mentoring in any facet of your database/web application design,
                      contact us to discuss options.

                      Comment


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

                        Originally posted by aburningflame View Post
                        Surprised anyone replied to this guy.
                        Rotten attitude that shouldnt be rewarded
                        Agreed Scott and what's the saying "an elephant never forgets!".
                        Alpha Anywhere v12.4.6.2.4 Build 7040-5530 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                        Comment


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

                          Not only me then?
                          I came across a chap looking for work. His opening letter said "you may address me as Mr Davies. Do not use my first name as presumed familiarity will not be tolerated".
                          Seems like his mum told him he was unique. Aren't we all?
                          Ted Giles
                          Example Consulting - UK
                          .

                          sigpichttp://ec12.example-software.com//
                          See our site for Alpha Support, Conversion and Upgrade.

                          Comment


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

                            Originally posted by Ted Giles View Post
                            His opening letter said "you may address me as Mr Davies. Do not use my first name as presumed familiarity will not be tolerated".
                            At least somebody has sense of humor.

                            Comment

                            Working...
                            X