26 Replies Latest reply on Feb 12, 2013 6:39 PM by fourwhitesocks

    Question about Spry Validation

    fourwhitesocks Level 1

      I know that Adobe is no longer going to further develop Spry, but will this affect the way you use Spry Validation in  Dreamweaver cs5.5 for validating Form Fields?   Or is that a dumb question?

       

      Does Dreamweaver use Spry Validation for Forms in DW CS6?

        • 2. Re: Question about Spry Validation
          fourwhitesocks Level 1

          Thanks for link to the tutorial.  I don't think I worded my question correctly; I ment if Adobe is no longer going to be developing Spry will we have to validate forms someday in the future without using Spry?

           

          I am glad to see though that they did still offer the validation in CS6...

          • 3. Re: Question about Spry Validation
            Nancy OShea Adobe Community Professional & MVP

            You can keep using Spry if you want to . 

             

            Personally, I've never used Client-Side Form Validation because it is dependant upon JavaScript.  On forms, this could be a problem because many people, including corporate & gov't employees, have JS disabled for security reasons.  

             

            Server-side validation is much more reliable.   I validate forms with PHP code which also collects & processes form data.  If you're considering a change, I recommend using server-side validation.

             

             

            Nancy O.

            • 4. Re: Question about Spry Validation
              fourwhitesocks Level 1

              Ok wow, thanks for that information.  Can you point me in the right direction for learning how to do that?  I'm very willing to learn!

              • 5. Re: Question about Spry Validation
                Nancy OShea Adobe Community Professional & MVP

                If your server supports PHP,

                 

                Formm@ailer PHP from DB Masters
                http://dbmasters.net/index.php?id=4

                 

                 

                Nancy O.

                • 6. Re: Question about Spry Validation
                  mhollis55 Level 4

                  Here is something that I have found useful from Montana Programmer

                   

                  But there are many other tutorials and I recommend you do a Google search for "php form validation."

                   

                  But Nancy's answer is really bugging me here. I do not use JavaScript for form validation, I use php. But I do use JavaScript a lot for lots of things. I also have a web store (wanna a cookie anyone?) that requires that JavaScript be active, because I have to get data from the HTML page—ribbon color, quantity and the like.

                   

                  First, are you confusing Java (developed by James Gosling at Sun Microsystems, bought by Oracle) with JavaScript (originally developed in Netscape, by Brendan Eich)? Gawd, I hope so.

                  Second, does this mean that my shopping cart will break with JavaScript disabled? Really, what I'm doing is just passing ribbon and other cart information to php using ajax.

                   

                  Mind you, there's no form validation here, just looking at quantities of what we have picked, ribbon color and putting information on the page that indicates to the user that they have XX items in their cart at the present time, based on their session ID.

                  • 7. Re: Question about Spry Validation
                    fourwhitesocks Level 1

                    Yep I know my server supports PHP because I have some PHP scripts running right now on a few sites.

                     

                    Ok so mhollis55;s reply is quite interesting as I had another question which is very similar possibly to something she mentioned.  She brings up a valid point.  I've also had other people tell me not to use certain JavaScripts for security reasons... how does one know if a JavaScript is safe to use?  I know this is off topic from my original question and I will learn how to validate my forms using PHP but I'm confused now as to which or what JavaScripts are 'safe' to use and I hope I'm not opening a giant can of worms here, maybe it should be in a whole new discusstion.....

                    • 8. Re: Question about Spry Validation
                      Ken Binney Adobe Community Professional & MVP

                      The Java coding language is an entirely different animal from Javascript.

                      Java has been the recently vulnerable technology

                       

                      Ooooops, just noticed thi has already been addressed by mhollis

                      My bad

                      • 9. Re: Question about Spry Validation
                        mhollis55 Level 4

                        In a modern browser (which means almost nothing from Microsoft), JavaScript is very safe. And don't confuse it with a Java Virtual Machine on your computer with JavaScripting code on a website.

                         

                        Here is why:

                         

                        JavaScript executes in the browser. So, if I write some JavaScript code to do an image gallery or a header that changes, your browser picks up that code and does what it says. Leave the website I have created and the code stops executing. Assuming your browser is reasonably up-to-date, you needn't worry.

                         

                        The Java Virual Machine is another story. Java can be initiated by JavaScript, so if your computer is set to run the JVM by default, JavaScript can actually put something harmful on your computer by loading something for your JVM to run. Modern browsers are now set up to turn off the JVM by default and ask you first if you want to download an application from the web (do you trust this website?). Shut down your browser and the JVM keeps executing the application.

                         

                        One really good example of the use of the JVM is screen sharing so that somene can control your computer from somewhere else and see what's going on. Adobe actually does this when you have a really bad problem that their tech support people need to solve. Other companies do this as well. But, because full access to your entire computer is possible through the JVM, it is (potentially) dangerous. So it is highly recommended that you do not have it enabled by default.

                         

                        JavaScript = safe.

                        Java = potentially dangerous.

                         

                        -Mark Hollis

                        • 10. Re: Question about Spry Validation
                          Nancy OShea Adobe Community Professional & MVP

                          @Marc,

                          I am not confusing JAVA with JavaScript.  In my experience, JS or AJAX is safe to use most of the time except when disabling it adversely impacts access to content or function. 

                           

                          Another example, I don't use menus that rely entirely on JavaScript.  I prefer menus that work without JS just in case the user has it turned off.

                           

                          I suggest you test your form with JavaScript disabled to ascertain whether or not this is a potential problem for your users.  Then go from there...

                           

                           

                          Nancy O.

                          • 11. Re: Question about Spry Validation
                            fourwhitesocks Level 1

                            So, Nancy O...  you would advise against using a menu like this:  http://www.javascriptkit.com/script/script2/2leveltab.shtml

                             

                            In case the JavaScripting it turned off? 

                            • 12. Re: Question about Spry Validation
                              mhollis55 Level 4

                              When you can create a fully-functioning menu with drop-downs (and overs) using CSS like this one, I do not recommend using JavaScript for menus.

                               

                              That was the result of a "pure CSS drop-down menu" search using Google.

                               

                              -Mark Hollis

                              • 13. Re: Question about Spry Validation
                                Nancy OShea Adobe Community Professional & MVP

                                I don't want to get too far off topic here.  But malicious JavaScripts can easily introduce viruses, spyware & trojans to an end user's system.  That's why many corporate, gov't and private agencies disable them.  Individuals can freely download JS blocking add-ons for their browsers.

                                 

                                No-Script Add-on for Firefox (has 2+ million users)

                                https://addons.mozilla.org/en-us/firefox/addon/noscript/

                                 

                                Script-Safe for Chrome

                                https://chrome.google.com/webstore/detail/scriptsafe/oiigbmnaadbkfbmpbfijlflahbdbdgdf/deta ils?hl=en

                                 

                                JavaScript Blocker for Safari

                                http://javascript-blocker.toggleable.com/

                                 

                                No-Scripts for Opera

                                https://addons.opera.com/en/extensions/details/notscripts/

                                 

                                JAVA threats are a totally different issue.  Especially vulnerable are mobile devices that use the Java platform to run apps.

                                http://www.webpronews.com/your-computer-and-mobile-device-remain-at-risk-in-2013-2013-01

                                 

                                 

                                Nancy O.

                                • 14. Re: Question about Spry Validation
                                  Nancy OShea Adobe Community Professional & MVP

                                  @Fourwhitesocks,

                                  I tested that menu with JS turned off.  The top level menus work but the sub-menus don't appear.   If you can live with that, keep using it.  If not, find something better.

                                   

                                  I like this CSS Menu.  It uses minimal JS to support IE6.  But since IE6 is nearly obsolete, you don't need it unless your target audience is in the 3rd world.

                                  http://www.red-team-design.com/css3-dropdown-menu

                                   

                                   

                                  Nancy O.

                                  • 15. Re: Question about Spry Validation
                                    mhollis55 Level 4

                                    Nancy, I recall a conversation you had with a few other people here, where you said something to the effect that one solution to rounded corners was to ignore IE.

                                     

                                    I am now in "ignore IE" mode for Internet Exploder 6. Heck, even Microsoft says you need to upgrade, on a website they made. Their stated goal is to see Internet Exploiter 6 drop to 1% worldwide (they have a problem with China where many people have stolen copies of Microsoft's operating system).

                                     

                                    JavaScript is required for the drop-down menus that harness JavaScript's abolity to show-hide (and animate). Straight CSS drop-down menus don't animate, but they use CSS's positioning and show/hide to get the same job done and, in my view, are simpler to use.

                                     

                                    Project 7 is using JavaScript in Pop Menu Magic 2 and Tree Menu Magic 2 as well. There's animation in these two menuing systems. For non-drop-down menus, Project 7 uses JavaScript for Menu Bar Magic animations (and I quite like those). I don't know how PMM2 and TMM 2 menuing degrades without JavaScript. Good Question for Al Sparber, who does participate here. For MBM animations, they "degrade" quite nicely, as a rollover won't cause any animation, but it won't cause the menu to disappear, either.

                                     

                                    Nancy, you have me really worried. I use more and more JavaScript these days and HTML5 seems to be pointing the way for even more. I want my websites to be dymanic and look cool. I'm not sure what a future without JavaScript would look like.

                                     

                                    -Mark Hollis

                                    • 16. Re: Question about Spry Validation
                                      ALsp Level 4

                                       

                                      Project 7 is using JavaScript in Pop Menu Magic 2 and Tree Menu Magic 2 as well. There's animation in these two menuing systems. For non-drop-down menus, Project 7 uses JavaScript for Menu Bar Magic animations (and I quite like those). I don't know how PMM2 and TMM 2 menuing degrades without JavaScript. Good Question for Al Sparber, who does participate here. For MBM animations, they "degrade" quite nicely, as a rollover won't cause any animation, but it won't cause the menu to disappear, either.

                                       

                                      Nancy, you have me really worried. I use more and more JavaScript these days and HTML5 seems to be pointing the way for even more. I want my websites to be dymanic and look cool. I'm not sure what a future without JavaScript would look like.

                                       

                                      In this day and age, "browsers with script disabled" is pretty much statistically irrelevant. That said, the latest versions of all of our menu products are fully accessible with script disabled. PMM2 reverts to a pure CSS menus and the drop-downs actually work. Tree Men uMagic simply expands to fully show all of the links, which is how our widgets behave. There is no problem.

                                       

                                      The issue of forms handling is a problem. Validation should be done with server-side scripting in PHP or a similar language and not via client-side JavaScript. Typically, though, it is not a fatal problem as most people forced to browse at work with constrained systems should not be browsing your site anyway. They should be working. If they need to access one of your client's sites (likely for personal reasons) they will likely be very comfrotable with waiting until they leave the office. Understand too, that the major social media sites, like Facebook, will not even allow you to log in unless JavaScript is enabled.

                                       

                                      To test your page with script disabled, simply use the developer tools that come with Chrome or IE9/10 and toggle script off.

                                       

                                      --

                                      Al Sparber - PVII
                                      http://www.projectseven.com
                                      The Finest Dreamweaver Menus | Galleries | Widgets
                                      Since 1998

                                      • 17. Re: Question about Spry Validation
                                        Nancy OShea Adobe Community Professional & MVP

                                        PVII pays close attention to accessibility.  While transitions/fades and other eye candy may not work with JS turned off, AFAIK content remains accessible.

                                         

                                        I use JQuery for a lot of stuff too -- mainly eye candy and other visual effects like fades/smooth scrolling, equal height columns, etc...  But I like to test without JS before I put it on a live site.  Easy to do in Firefox with the Web Developer Toolbar.  See screenshot:

                                         

                                        Firefox-disableJS.jpg

                                         

                                        Nancy O.

                                        • 18. Re: Question about Spry Validation
                                          BenPleysier Adobe Community Professional & MVP

                                          Wrapped in one sentence:

                                           

                                          ALL validation MUST be made on the server side and, to add a bit of flair, you CAN use SpryValidation widgets.

                                          • 19. Re: Question about Spry Validation
                                            fourwhitesocks Level 1

                                            Man you guys are the greatest, this is such a learning experience LOL!!  Thank you all so much. 

                                             

                                            OK, Nancy O,  I just installed the web developer toolbar and mine looks completely different...yours looks to be at the top of your page and mine is something differrent looking at the bottom.  I can't seem to find where to disable the JavaScript....one question always leads to another with me I guess, any hints?

                                            • 20. Re: Question about Spry Validation
                                              John Waller Adobe Community Professional & MVP

                                              Are you talking about Firebug (bottom of screen) or the Web Developer Toolbar (top of screen)?

                                               

                                              Did you download from https://addons.mozilla.org/en-US/firefox/addon/web-developer/?

                                              • 21. Re: Question about Spry Validation
                                                fourwhitesocks Level 1

                                                Nope i'm not talking about the Firebug I'm aware of that as I already have and use that all the time.  Well I was talking specifically about the web developer toolbar that Nanco O was referring to but I was able to disable the javascript a different way.

                                                 

                                                I couldn't however get the toolbar to look like it does in the top of her screenshot.  I would like to have that available.

                                                 

                                                  I wonder if we are looking at it with different versions of Firefox because I did install it after reading her post but it shows up at the bottom of my screen and looks nothing like the screenshot she posted...confusing...web dev toolbar.JPG

                                                Mine looks like this when I bring it up....and it's on the bottom of the screen??

                                                • 22. Re: Question about Spry Validation
                                                  fourwhitesocks Level 1

                                                  OMGosh I just got it to come up....sorry I got the toolbar to look like her's now. 

                                                  • 23. Re: Question about Spry Validation
                                                    John Waller Adobe Community Professional & MVP

                                                    You have downloaded the GCLI Developer Toolbar

                                                    https://developer.mozilla.org/en-US/docs/Tools/GCLI

                                                     

                                                    Nancy's screenshot is from Chris Pedrick's Web Developer Toolbar. Refer link in my Post #20 above.

                                                    • 24. Re: Question about Spry Validation
                                                      fourwhitesocks Level 1

                                                      Ok thank you John, I got  the toolbar correctly now!

                                                       

                                                      Ok just to recap what about my original question:  Altrustic Gramps said a few posts ago that I CAN use Spry Validation widgets.  SO MY INTERPRETATION of that is that I CAN use the Spry Validation which is within Dreamweaver Cs5.5 or Dreamweaver CS6....but that's not server side so I guess I remain confused...

                                                      • 25. Re: Question about Spry Validation
                                                        Nancy OShea Adobe Community Professional & MVP

                                                        To recap my orignal post. Use Spry Validation if you want to.  But don't use it for the really vital stuff.  Server-side validation is reliable.  Client-side validation is not.

                                                         

                                                        Good luck.

                                                         

                                                        Nancy O.

                                                        • 26. Re: Question about Spry Validation
                                                          fourwhitesocks Level 1

                                                          Nancy O. wrote:

                                                           

                                                          @Fourwhitesocks,

                                                          I tested that menu with JS turned off.  The top level menus work but the sub-menus don't appear.   If you can live with that, keep using it.  If not, find something better.

                                                           

                                                          I like this CSS Menu.  It uses minimal JS to support IE6.  But since IE6 is nearly obsolete, you don't need it unless your target audience is in the 3rd world.

                                                          http://www.red-team-design.com/css3-dropdown-menu

                                                           

                                                           

                                                          Nancy O.

                                                           

                                                           

                                                           

                                                           

                                                          I see that you are totally correct!  I love the CSS MENU from the link you suggested.  Do you have any similar hints for a vertical menu with flyouts, I'm thinking that it would be better for responsive design to use vertical menus??