[jQuery] Re: validate - error messages keep piling up
Works now :) Had to create a special class that combined all three classes. On Dec 17, 5:36 pm, Mark Livingstone namematters...@msn.com wrote: OK, thanks. I will try and report back. On Dec 16, 12:22 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have three classes specified for the errorClass. The plugin can't handle that. If you actually need more then one class, use the highlight and unhighlight options to add and remove those. Jörn On Wed, Dec 16, 2009 at 4:43 PM, Mark Livingstone namematters...@msn.comwrote: On Dec 16, 9:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: At least post your full JS codes instead of just excerpts. Jörn http://jsbin.com/isuco/edit I can e-mail you the link to my working page if that will help. Unfortunately I cannot share it here.
[jQuery] Re: validate - error messages keep piling up
OK, thanks. I will try and report back. On Dec 16, 12:22 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You have three classes specified for the errorClass. The plugin can't handle that. If you actually need more then one class, use the highlight and unhighlight options to add and remove those. Jörn On Wed, Dec 16, 2009 at 4:43 PM, Mark Livingstone namematters...@msn.comwrote: On Dec 16, 9:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: At least post your full JS codes instead of just excerpts. Jörn http://jsbin.com/isuco/edit I can e-mail you the link to my working page if that will help. Unfortunately I cannot share it here.
[jQuery] Re: validate - error messages keep piling up
anyone? :) On Dec 15, 12:37 pm, Mark Livingstone namematters...@msn.com wrote: Hi, Since I moved to a new design I cannot figure out how to stop the validate plug-in to append error messages and instead have it remove the previous error message before creating another one. here is what my HTML code looks like with multiple error messages: p label for=email E-mail /label input class=text-input medium-input input-notification error png_bg name=client[email] id=email value={EMAIL} size=25 span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email Please enter a valid e-mail address /span /p CSS: .errorValidate { padding: 2px 0 2px 22px; margin: 0 0 0 5px; } JS: var validateForm = $(#clientUpdateForm).validate( { errorClass: errorValidate, /etc/... } Any ideas why it would do that? Thanks in advance!
[jQuery] Re: validate - error messages keep piling up
Jörn , it's hard to extract the code and make it functional just for jsbin.com Basically, the validation plug-in APPENDS span element that contains the error message right after the input field. When another message appears, it appends it again instead of first removing the initial message. My workaround is ugly but does the job: onkeyup: function(element) { $(element).next().remove(); }, focusInvalid: false, invalidHandler: function() { $(span).each(function(){ if($(this).attr(class) == input- notification error png_bg) { $(this).remove(); } }); }, onfocusout: function(element) { $(element).next().remove(); $(span).each(function(){ if($(this).next().attr(class) == input- notification error png_bg) { $(this).next().remove(); } }); }, This basically shows error messages only when the form is submitted. When the input field is in focus, it removes the error message. The onfocusout option removes repeated messages. I just can't figure out why it would behave this way. On Dec 16, 8:58 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Could you provide a full example, eg. via jsbin.com? Jörn On Wed, Dec 16, 2009 at 2:53 PM, Mark Livingstone namematters...@msn.comwrote: anyone? :) On Dec 15, 12:37 pm, Mark Livingstone namematters...@msn.com wrote: Hi, Since I moved to a new design I cannot figure out how to stop the validate plug-in to append error messages and instead have it remove the previous error message before creating another one. here is what my HTML code looks like with multiple error messages: p label for=email E-mail /label input class=text-input medium-input input-notification error png_bg name=client[email] id=email value={EMAIL} size=25 span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email Please enter a valid e-mail address /span /p CSS: .errorValidate { padding: 2px 0 2px 22px; margin: 0 0 0 5px; } JS: var validateForm = $(#clientUpdateForm).validate( { errorClass: errorValidate, /etc/... } Any ideas why it would do that? Thanks in advance!
[jQuery] Re: validate - error messages keep piling up
On Dec 16, 9:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: At least post your full JS codes instead of just excerpts. Jörn http://jsbin.com/isuco/edit I can e-mail you the link to my working page if that will help. Unfortunately I cannot change it here.
[jQuery] Re: validate - error messages keep piling up
On Dec 16, 9:59 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: At least post your full JS codes instead of just excerpts. Jörn http://jsbin.com/isuco/edit I can e-mail you the link to my working page if that will help. Unfortunately I cannot share it here.
[jQuery] validate - error messages keep piling up
Hi, Since I moved to a new design I cannot figure out how to stop the validate plug-in to append error messages and instead have it remove the previous error message before creating another one. here is what my HTML code looks like with multiple error messages: p label for=email E-mail /label input class=text-input medium-input input-notification error png_bg name=client[email] id=email value={EMAIL} size=25 span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email This field is mandatory /span span class=errorValidate generated=true htmlfor=email Please enter a valid e-mail address /span /p CSS: .errorValidate { padding: 2px 0 2px 22px; margin: 0 0 0 5px; } JS: var validateForm = $(#clientUpdateForm).validate( { errorClass: errorValidate, /etc/... } Any ideas why it would do that? Thanks in advance!
[jQuery] Re: Plug-in to display (overlay) DIV element on the page at all times?
Thanks to all. I know that this can be done using CSS but dailylife.com uses JS, since disabling it disables the feedback tab. That's why I was wondering if there's a plug-in for jQuery that does the same.
[jQuery] Plug-in to display (overlay) DIV element on the page at all times?
Example: http://www.daylife.com/ (facebook tab on the left). Is anyone aware of a jQuery plug-in that would do something similar? Thanks.
[jQuery] Re: Using $_POST to transmit large key/pair
Thanks, Beres. I am reading this order_message from a DIV. How do I 'POST' it? By using form? Also, to url encode... do I use escape()? On Jan 30, 3:08 am, Beres Botond boton...@gmail.com wrote: You want to use POST, but you are sending your data as GET (without url encoding). So I'm pretty sure it cuts before #, because # is a non-alphanumeric character and you haven't urlencoded your data. Data in URL = GET, not POST, even if you are using $.post . http://docs.jquery.com/Post So either urlencode your data before putting it in the request or send it as POST. Also I'm not sure how it worked for you on server-side, if you were expecting $_POST... I assume you were expecting $_REQUEST instead, which is not a good idea in my opinion. On Jan 30, 8:08 am, Mark Livingstone namematters...@msn.com wrote: I have the following code: $.post(order_send_email.php?order_message='+order_message) my 'order_message' is: 'Dear '+data['salutation']+ +data['first_name']+ +data['last_name'] +', \n\nThis is to inform you that your order #'+key+ and payment in the amount of...'; When using $.POST... the message gets cut before #. Is there a limit on how much cam be transmitted or am I doing something wrong? Thanks.- Hide quoted text - - Show quoted text -
[jQuery] Re: Using $_POST to transmit large key/pair
ah, I thought that { key : pair } was just a replacement for key=pair... On Jan 30, 2:25 pm, Beres Botond boton...@gmail.com wrote: As shown in the docs (link I gave you), it should work $.post(order_send_email.php, {order_message : order_message}, // {key : variable} function(data) { alert(data); // do something }); On Jan 30, 4:03 pm, Mark Livingstone namematters...@msn.com wrote: Thanks, Beres. I am reading this order_message from a DIV. How do I 'POST' it? By using form? Also, to url encode... do I use escape()? On Jan 30, 3:08 am, Beres Botond boton...@gmail.com wrote: You want to use POST, but you are sending your data as GET (without url encoding). So I'm pretty sure it cuts before #, because # is a non-alphanumeric character and you haven't urlencoded your data. Data in URL = GET, not POST, even if you are using $.post . http://docs.jquery.com/Post So either urlencode your data before putting it in the request or send it as POST. Also I'm not sure how it worked for you on server-side, if you were expecting $_POST... I assume you were expecting $_REQUEST instead, which is not a good idea in my opinion. On Jan 30, 8:08 am, Mark Livingstone namematters...@msn.com wrote: I have the following code: $.post(order_send_email.php?order_message='+order_message) my 'order_message' is: 'Dear '+data['salutation']+ +data['first_name']+ +data['last_name'] +', \n\nThis is to inform you that your order #'+key+ and payment in the amount of...'; When using $.POST... the message gets cut before #. Is there a limit on how much cam be transmitted or am I doing something wrong? Thanks.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[jQuery] Using $_POST to transmit large key/pair
I have the following code: $.post(order_send_email.php?order_message='+order_message) my 'order_message' is: 'Dear '+data['salutation']+ +data['first_name']+ +data['last_name'] +', \n\nThis is to inform you that your order #'+key+ and payment in the amount of...'; When using $.POST... the message gets cut before #. Is there a limit on how much cam be transmitted or am I doing something wrong? Thanks.
[jQuery] jQuery plug-in to preload javascript?
Hi. There are numerous plug-ins to preload images, but is there a way to preload javascript? My application uses around 12 plug-ins and they take about 20 seconds or so to load before the page shows... so, is there a way I can display a loading message while I somehow preload the scripts? Thanks,
[jQuery] Editable SELECT element plug-in?
Would anyone happen to know of some in-place editable plug-in for SELECT elements similar to http://code.google.com/p/jquery-jec/ ? Jquery-jec doesn't only allows me to add a new item into the select box, but not to edit fixed options. Thanks.