[jQuery] Re: Focus First 'visible' field

2008-04-22 Thread Jacky See
when I applied your code to my form. On Apr 13, 7:54 am, Jacky See [EMAIL PROTECTED] wrote: Hi all, For focusing first input text field, the usual solution is $ (':text:visible:enabled:eq(0)').focus(). However, when these fields are in an ':hidden' parent (not 'visible' by our eyes

[jQuery] [Validation] Validate differently based on different action

2008-04-17 Thread Jacky See
Hi all, I think this is a rather rare situation but it happens in our apps all the time. The layout is like --- Search Result table tr [checkbox] status [input text] [input text] [textarea] /tr /table [Delete button] [Reject Button] [Update Button] There are different case of

[jQuery] Focus First 'visible' field

2008-04-13 Thread Jacky See
Hi all, For focusing first input text field, the usual solution is $ (':text:visible:enabled:eq(0)').focus(). However, when these fields are in an ':hidden' parent (not 'visible' by our eyes), it won't work. Currently I tried to solve this by: $(:text:visible:enabled).filter(function(){

[jQuery] Re: [Validation]How to make two field check output one message?

2008-04-12 Thread Jacky See
I have put up a page to test. http://www.seezone.net/dev/dateValiation.html I need to use different method for different group of dates. In that case, a global dateRange method seems not possible? On 4月11日, 上午6時03分, Jörn Zaefferer [EMAIL PROTECTED] wrote: Jacky See schrieb: Hi, Some

[jQuery] Re: How to get a 'fresh' ui datepicker date?

2008-04-11 Thread Jacky See
(options); } On 4月11日, 上午3時14分, Jacky See [EMAIL PROTECTED] wrote: I have found some wicked way to do it. This is the code where I'm writing a plugin to accept date range pair and auto-init them. //Assuming from/to date have same prefix id (e.g. #eventFromDate, #eventToDate

[jQuery] [Validation]How to make two field check output one message?

2008-04-10 Thread Jacky See
Hi, Some question on the config of validation plugins. Suppose there are #fromDate and #toDate fields (using ui.datepicker). I have added these custom rules jQuery.validator.addMethod(afterFromDate ,function(value, element, targetId){ var

[jQuery] How to get a 'fresh' ui datepicker date?

2008-04-10 Thread Jacky See
Dear all, This is about the ui datepicker. I have an input field with a datepicker, using image as trigger. The field is not read only, user are allowed to input by keyboard. The problem is that when user type some invalid input like '33' the $('#input').datepicker('getdate'), will still

[jQuery] Re: How to get a 'fresh' ui datepicker date?

2008-04-10 Thread Jacky See
09分, Jacky See [EMAIL PROTECTED] wrote: Dear all, This is about the ui datepicker. I have an input field with a datepicker, using image as trigger. The field is not read only, user are allowed to input by keyboard. The problem is that when user type some invalid input like '33