Re: [jQuery] Form Plugin curiosity
I've got an example page, basically a watered down version of what I'm working on. I'm actually using his sha1 implementation. Just put in some information (nothing is actually saved, the script just displays what you inputed). Oh, and the email address isn't really checked, you can put in whatever right now. But, the email and passwords do need to match. Just hit create, and see what it does. I did test it, and it's still being funky. http://brian.radioactivepickles.us/formtest/ On 2/16/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Are you using something like http://pajhome.org.uk/crypt/md5/ for your encryption? are you doing something like: var options = { beforeSubmit: function(formArray, jqForm) { encryptform(); // just example }}; Maybe an example page? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Brian Ronk ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form Plugin curiosity
Brian, two things and a suggestion: try $( '#account_pass' ).val(hex_sha1( $( '#account_pass' ).val())); $( '#account_pass_confirm' ).val(hex_sha1( $( '#account_pass_confirm' ).val())); instead of accform.account_pass.value = hex_sha1( accform.account_pass.value ); accform.account_pass_confirm.value = hex_sha1( accform.account_pass_confirm.value ); Just before you do return true; alert($( '#account_pass' ).val()); just to make sure it is converted. also, I would suggest that you don't do if(error) { // errors $( '#account_pass' ).val(); $( '#account_pass_confirm' ).val(); return false; } that will make your end user frustrated, IMO hope this helps -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form Plugin curiosity
Ok, I made those changes. I actually was doing the sha1 that way before, but changed it to see if that was the problem. If you take a look at it now, I think you'll laugh. Basically, the alert shows the correct info (the sha1'd password), but what is displayed is still plain text. I'm wondering if this is related to the issue with the plugin sending info twice (one of the other threads going around right now). On 2/16/07, Benjamin Sterling [EMAIL PROTECTED] wrote: Brian, two things and a suggestion: try $( '#account_pass' ).val(hex_sha1( $( '#account_pass' ).val())); $( '#account_pass_confirm' ).val(hex_sha1( $( '#account_pass_confirm' ).val())); instead of accform.account_pass.value = hex_sha1( accform.account_pass.value ); accform.account_pass_confirm.value = hex_sha1( accform.account_pass_confirm.value ); Just before you do return true; alert($( '#account_pass' ).val()); just to make sure it is converted. also, I would suggest that you don't do if(error) { // errors $( '#account_pass' ).val(); $( '#account_pass_confirm' ).val(); return false; } that will make your end user frustrated, IMO hope this helps -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ -- Brian Ronk ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form Plugin curiosity
plain text. I'm wondering if this is related to the issue with the plugin sending info twice (one of the other threads going around right now). The plugin does not send data twice. The other thread was about returned scripts being evaluated twice. Your code is encrypting the data that the plugin extracted from your form, but it's not doing anything else. The first argument to beforeSubmit is an array of data that is going to be passed to the server. You need to update the data in that array. Mike ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Form Plugin curiosity
I'm new to jQuery, and found the Forms plugin. So far it seems to be working fine, but I ran into 2 issues earlier. First, it was working, but it was acting like a normal form, not an ajax form. I had some errors in my script (used the wrong id in checking a password), and when I changed that, it started working fine. No clue why. Secondly, I want to encrypt a password (I'm using this on an account creation page, and it returns a blurb if it was successful or not). Anyway, as I'm testing, I'm noticing that while it's encrypted on the client side (I see the password change length in the password form), when the user is entered into the database, the password is unencrypted. Why is this? I'm I just encrypting it at the wrong point? -- Brian Ronk ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Form Plugin curiosity
Are you using something like http://pajhome.org.uk/crypt/md5/ for your encryption? are you doing something like: var options = { beforeSubmit: function(formArray, jqForm) { encryptform(); // just example }}; Maybe an example page? -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/