[jQuery] Re: Tabs Validation

2008-04-13 Thread MarcelloP

Thank you very much Karl.

On Apr 12, 7:30 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 I think in this case you should reconsider using tabs at all. If you
 want to use tabs you should put error messages on top of the tab pane,
 so that the errors are visible to the user.

 --Klaus

 On Apr 10, 4:50 pm, MarcelloP [EMAIL PROTECTED] wrote:

  Hi all!
  I need a little advice; in a page I have a form with a tabs with 3 tab-
  pages, all with input elements and all required; in this form I also
  have enabled the splendid Validation plugin.
  My concern is this: if a user fill only the inputs of the first tab-
  page and leave blank the others, he cannot submit the form 'cause this
  is correctly stopped by the validation plugin, but the problem is that
  the user cannot see the invalid inputs (highlighted by the Validation)
  on the others tabpages 'cause he is on the first.

  Please, someone may suggest me the correct way to proceed within?
  Thanks in advance.

  MarcelloP


[jQuery] Re: Superfish current state

2008-04-13 Thread Joel Birch

Hi David,

Notice on the official horizontal example the nav class is on the
parent ul element, and the CSS depends on it being that way. You are
using an id instead - which is fine - except that you have it on a
containing div element. Much of your CSS that should be targeting the
parent ul (and not nested uls) is probably either targeting the div
and/or leaking through to the nested ul elements.

Also, you should remove the trailing comma after speed:slow in the
options object as that is incorrect and will cause additional problems
in certain browsers.

Joel Birch.


[jQuery] Re: Appending URL and Session variables to redirect script

2008-04-13 Thread Bob Woodard


 All I need now is to figure out the syntax of moving my 
 script over into a separate .js file instead of being inline.

Instead of a separate .js, why not use an #include that would pull
in the javascript code dynamically and resolve the variables for you?  I've
done this to build javascript on the fly when needed.




[jQuery] navigation with word based links instead of numbers - jcarousel with external controls

2008-04-13 Thread shaneog

Hi All,

I would like to change it so I can call frames within j carousel using
word based links.  By default, jcarousel with external controls,
calls frames using the text (numbers) within a link, for example...

div class=jcarousel-control
  a href=#1/a
  a href=#2/a
  a href=#3/a
  a href=#4/a
/div

and assigns the number to each frame using the below function...

jQuery('.jcarousel-control a').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});

basically, i am trying to do something similar to http://jobberbase.com
where they use...

lia id=item_2 href=#What's different?/a/li

to call a frame within the carousel using the id tag.  Then they use

function theCarousel(carousel)
{
$('#nav ul a').bind('click', function() {
var index = 
$(this).attr(id).split(_);
carousel.scroll(jQuery.jcarousel.intval(index[1]));
$('#nav ul a').removeClass(active);
$(this).addClass(active);
  return false;
});

and assign a number to the frame using id within the div tag.

If anyone knows of a way I can edit this code to work similarly, I
would be very, very happy :)

Thanks

http://sorgalla.com/jcarousel/



[jQuery] Re: ui.sortable problem

2008-04-13 Thread jon

I can second that this bug exists. Does anyone have a workaround?

On Apr 6, 8:48 am, Vaska [EMAIL PROTECTED] wrote:
 I've noticed the oddest thing...or perhaps it's not odd at all. I have  
 a series of lists that I use ui.sortable to move things around...works  
 great...except...

 It creates an extra li element and attaches it to the end of the  
 active ul group. For instance I start with...

 ul
 lione/li
 litwo/li
 lithree/li
 /ul

 And when I'm done dragging, using $('#id').sortables( ... stop:  
 function(){ }... ); and I alert out the order of things I will get:

 (moving two to first position)

 ul
 litwo/li
 lione/li
 lithree/li
 litwo/li
 /ul

 I'm not sure how to deal with this...I must be missing something here.  
 I see in the documentation 'update' where I was hoping to refresh the  
 order before 'stop'...I've even tried using 'refresh' in my stop  
 function but nothing works.

 Any ideas?

 Thanks


[jQuery] jtooltips tips only on class=toolTips

2008-04-13 Thread jambla

Hello,

I have installed jtooltips in Drupal.  I was wondering if its possible
to have the tool tips active on only titles that have a tooltips
class?
Right now, anything with a title uses jtooltips, I would like to only
use jtooltips if I have added class=toolTips.

Thanks for your help!


[jQuery] Re: Passing variables between two function

2008-04-13 Thread Decagrog

Sorry for double post...
Thanks , simple and works! I've almost no knowledge of javascrpit but
jquery is very powerful and intuitive...i'm trying to make a sort of
horizontal menu with incorporated a slide for navigate to left and
right...it's essentially a trivial thing but if i can make something
userful  i'd like to share here.

On 11 Apr, 14:18, Richard D. Worth [EMAIL PROTECTED] wrote:
 Declare the variable in the same scope as each of those functions is
 declared. For example:

 $(function() {

   var pointX;

   $(.nav_slider).mousemove(function(e) { ... // set pointX here ... });

   $(document).scroll(function() { ...// use pointX here... });

 });

 - Richard

 Richard D. Worthhttp://rdworth.org/

 On Fri, Apr 11, 2008 at 4:33 AM, Decagrog [EMAIL PROTECTED] wrote:

  Hi all,
  I've a newbie question about variable scope...essentially  i've two
  anonimous function and i need to retrieve a variable
  generated into first function and use it in the second one.

  Here the basic code to get an idea of what i'm  trying...

   var pointX ;
   $(.nav_slider).mousemove(function(e){
 pointX = e.pageX ;
 // do some other stuff with  pointX ...
   });

   $(document).scroll(function () {
   var docH = $(window).height();
   var   docW = $(window).width();
   docWcenter =  docW / 2;

  //here i need again pointX ...
  $(#point).css( 'position',
  'relative' ).animate({ left :docWcenter + pointX + px}, 200 );
   });

  How i can retrieve it?


[jQuery] Re: Passing variables between two functions

2008-04-13 Thread Decagrog

It give me an undefined variable...
For error i've make a double post with that question, here
http://groups.google.com/group/jquery-en/browse_thread/thread/85431413ea0aad30/2f47f4c6d1d175df?lnk=gstq=between+function#2f47f4c6d1d175df
a guy gave me a solution...

On 12 Apr, 19:21, J Moore [EMAIL PROTECTED] wrote:
 looks good. pointX is a global variable and can be accessed by both
 functions. What's the problem?

 On Apr 11, 6:13 am, Decagrog [EMAIL PROTECTED] wrote:

  Hi all,
  I've a newbie question about variable scope...essentially  i've two
  anonimous function and i need to retrieve a variable generated into
  first function and use it in the second one.

  Here the basic code to get an idea of what i'm  trying...

var pointX ;
$(.nav_slider).mousemove(function(e){
  pointX = e.pageX ;
  // do some other stuff with  pointX ...
});

$(document).scroll(function () {
var docH = $(window).height();
var   docW = $(window).width();
docWcenter =  docW / 2;

   //here i need again pointX ...
   $(#point).css( 'position',
  'relative' ).animate({ left :docWcenter + pointX + px}, 200 );
});


[jQuery] weird error in globalEval

2008-04-13 Thread Rene Veerman
In IE (but not in firefox) i suddenly got a 'fatal' error in globalEval;
wrong argument passed in the last line, that says head.removeChild
(script)..

In order to get things working again, i've had to make a small workaround;
globalEval: function( data ) {
data = jQuery.trim( data );

if ( data ) {
// Inspired by code by Andrea Giammarchi
//
http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
var head = document.getElementsByTagName(head)[0] ||
document.documentElement,
script = document.createElement(script);

script.type = text/javascript;
if ( jQuery.browser.msie )
script.text = data;
else
script.appendChild( document.createTextNode( data ) );

head.appendChild( script );
try {
head.removeChild( script );
} catch (e) {

}
}
},

IE's debugger call-stack shows that the initiator to this problem was
jScrollPane;
$('#scroller.jScrollPane').jScrollPane({showArrows:true,
scrollbarWidth: 15, arrowSize: 16});

/* See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id: jScrollPane.js 4765 2008-02-17 21:14:59Z kelvinluck $
 */


So i'm moving on now, but i just thought i'd let you guys know...
Thanks again for releasing jQuery under good licenses in the first place,
using it has been a real pleasure so far :)


[jQuery] how to select?

2008-04-13 Thread tetris

I have been trying to select the a tags in a ulli config. with
no succes:

$(document).ready(function() {
$('#sub-portfolio .button').click(function(event) {
$('#sub-portfolio .button').removeClass('selected');
$(this).addClass('selected');
event.stopPropagation();
});
});



html part:

ul id=sub-portfolio
li class=buttona href=Print/a/li
li class=button id=webWeb/li
li class=buttonVideo/li
/ul


my goal is that each time you click a li it gets the 'selected'
class(so only one li has the 'selected' class at a time), the
function works if i remove the a href part from the li but i need
this part or i loose the hover class, so my problem is that im unable
to reach the a href part with this selector: $('#sub-
portfolio .button')

any help would be appreciated


[jQuery] released: jQuery plugin buttonAnimated v1.0 - PNG animations onHover

2008-04-13 Thread Rene Veerman
I thought it would be nice to have buttons on my websites without the need
for photoshopping every time i need a different text on my button.
Since i would use a PNG template button to overlay text on, I added the
possibility to do animations onHover..

You can check it out at
http://mediabeez.ws/mediaBeez/permalink.php?tag=buttonAnimated

It's a work in progress, and only a 1.0 release.
There's no ability to disable a button yet, i'll add that this week.

Hope you have fun with it ;)


[jQuery] Re: Tabs Validation

2008-04-13 Thread Nicolas R

Perhaps you could prevent the user from accessing another tab when
there are errors on the tab he is currently looking at.

On Apr 12, 1:30 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 I think in this case you should reconsider using tabs at all. If you
 want to use tabs you should put error messages on top of the tab pane,
 so that the errors are visible to the user.

 --Klaus

 On Apr 10, 4:50 pm, MarcelloP [EMAIL PROTECTED] wrote:

  Hi all!
  I need a little advice; in a page I have a form with a tabs with 3 tab-
  pages, all with input elements and all required; in this form I also
  have enabled the splendid Validation plugin.
  My concern is this: if a user fill only the inputs of the first tab-
  page and leave blank the others, he cannot submit the form 'cause this
  is correctly stopped by the validation plugin, but the problem is that
  the user cannot see the invalid inputs (highlighted by the Validation)
  on the others tabpages 'cause he is on the first.

  Please, someone may suggest me the correct way to proceed within?
  Thanks in advance.

  MarcelloP


[jQuery] Re: triggering clueTip with inline javascript

2008-04-13 Thread az

I've made some progress.

I think I've discovered why the clueTips weren't working in IE.
I haven't been able to find much info about it, but according
to this bug ticket, .click() doesn't work in IE:

http://dev.jquery.com/ticket/2352

So, I've implemented the workaround described in the ticket
and things seem to be working in IE!

Here's the updated test page:

http://www.prep-u.com/demo/cluetest.html

That's good, but the waitImage in Firefox is still showing up
in the wrong place.  It's minor, but I'd love a solution that
works 100%.

Any ideas?

thanks,
az


On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote:
 Hi Karl,

 As always, thanks for your help.

 Here is my test page:

 http://www.prep-u.com/demo/cluetest.html

 On the test page there are only 4 links.  So obviously I
 could just bindclueTipthe normal way.  But my live page
 will have thousands of links in some cases.  Since that's
 a lot of binding, I'm trying to do no binding on page load.
 Instead each link calls this javascript function:

 functionclueTip( link ){
 var linkid = '#' + link;
 // bind then click
 $(linkid).cluetip().click();

 }

 which is supposed to bind theclueTipand then
 click the link to trigger theclueTip.

 Problems:

 1. In Firefox it's working, but the waitImage seems
 to be appearing in the wrong place.
 2. In IE7 it doesn't work at all.  It's giving me an invalid
 argument
 error that seems to be caused by .click().

 Any help is greatly appreciated!

 One final note:  notice that you can click on theclueTiptitlebar and
 drag it around the screen.  That's thanks to your help on a previous
 post!

 az

 On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote:

  Hi az,

  Unfortunately, I've completely lost the context for what you're doing
  here. Do you have a page up somewhere that we can look at to see the
  whole thing? That would be very helpful.

  --Karl
  _
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Apr 11, 2008, at 5:52 AM, az wrote:

   Anyone have any thoughts on this?

   thanks!
   az

   On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote:
   Hello,

   As I discussed in a previous post (unresponsive script error
   on long page with many clueTips) I'm trying to trigger clueTips
   with a javascript function instead of binding the clueTips on page
   load.

   Each link calls theclueTipfunction and passes its unique link id.
   Here is the function:

   functionclueTip( id ){
  var linkid = '#' + id;
  // bind then click
  $(linkid).cluetip().click();

   }

   It mostly works on Firefox, except that the waitImage is acting
   strangely.  Sometimes it doesn't show up at all.  And sometimes
   it shows up but in the location of the previously clickedclueTip!
   But the actualclueTipalways shows up in the right place.

   On IE7 it doesn't work at all.  It's giving me an invalid argument
   error that seems to be caused by .click().

   Any ideas?  Is my approach fundamentally flawed or am I missing
   something small?

   thanks!
   az


[jQuery] Re: triggering clueTip with inline javascript

2008-04-13 Thread Karl Swedberg


hi again az,

sorry, I've been terribly busy, but I'll try to take a look later on  
today.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Apr 13, 2008, at 4:53 AM, az wrote:



I've made some progress.

I think I've discovered why the clueTips weren't working in IE.
I haven't been able to find much info about it, but according
to this bug ticket, .click() doesn't work in IE:

http://dev.jquery.com/ticket/2352

So, I've implemented the workaround described in the ticket
and things seem to be working in IE!

Here's the updated test page:

http://www.prep-u.com/demo/cluetest.html

That's good, but the waitImage in Firefox is still showing up
in the wrong place.  It's minor, but I'd love a solution that
works 100%.

Any ideas?

thanks,
az


On Apr 12, 2:07 am, az [EMAIL PROTECTED] wrote:

Hi Karl,

As always, thanks for your help.

Here is my test page:

http://www.prep-u.com/demo/cluetest.html

On the test page there are only 4 links.  So obviously I
could just bindclueTipthe normal way.  But my live page
will have thousands of links in some cases.  Since that's
a lot of binding, I'm trying to do no binding on page load.
Instead each link calls this javascript function:

functionclueTip( link ){
   var linkid = '#' + link;
   // bind then click
   $(linkid).cluetip().click();

}

which is supposed to bind theclueTipand then
click the link to trigger theclueTip.

Problems:

1. In Firefox it's working, but the waitImage seems
to be appearing in the wrong place.
2. In IE7 it doesn't work at all.  It's giving me an invalid
argument
error that seems to be caused by .click().

Any help is greatly appreciated!

One final note:  notice that you can click on theclueTiptitlebar and
drag it around the screen.  That's thanks to your help on a previous
post!

az

On Apr 11, 9:28 am, Karl Swedberg [EMAIL PROTECTED] wrote:


Hi az,


Unfortunately, I've completely lost the context for what you're  
doing

here. Do you have a page up somewhere that we can look at to see the
whole thing? That would be very helpful.



--Karl
_
Karl Swedbergwww.englishrules.comwww.learningjquery.com



On Apr 11, 2008, at 5:52 AM, az wrote:



Anyone have any thoughts on this?



thanks!
az



On Apr 9, 1:58 pm, az [EMAIL PROTECTED] wrote:

Hello,



As I discussed in a previous post (unresponsive script error
on long page with many clueTips) I'm trying to trigger clueTips
with a javascript function instead of binding the clueTips on page
load.



Each link calls theclueTipfunction and passes its unique link id.
Here is the function:



functionclueTip( id ){
  var linkid = '#' + id;
  // bind then click
  $(linkid).cluetip().click();



}



It mostly works on Firefox, except that the waitImage is acting
strangely.  Sometimes it doesn't show up at all.  And sometimes
it shows up but in the location of the previously clickedclueTip!
But the actualclueTipalways shows up in the right place.


On IE7 it doesn't work at all.  It's giving me an invalid  
argument

error that seems to be caused by .click().



Any ideas?  Is my approach fundamentally flawed or am I missing
something small?



thanks!
az




[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(){
return $(this).parents(:hidden).size()==0;
}).slice(0,1).focus();

I have setup a test page for this: http://www.seezone.net/dev/focusField.html
Try to toggle different parent to and click 'focus'. It should work
correctly.

I would like to know if there is any other 'selector-based' way to do
so?


[jQuery] No longer with Ext JS

2008-04-13 Thread Rey Bango


Hi guys,

As of yesterday, I am no longer with Ext JS. Ext is making some big 
changes organizationally, some of which I am not in agreement with. 
Hence, I've turned in my resignation, effective immediately.


Many of the changes at Ext will be visible shortly and some will 
manifest themselves over time. Either way, their direction and decisions 
 weren't in line with my views and I felt it was best to move on.


The split is amicable and at the end of the day, is purely business.

The good thing is that I can now refocus on promoting jQuery without the 
constant concern of stepping on Ext's toes. This will be especially 
helpful to the jQuery UI team which has done a marvelous job and will 
greatly benefit from a stronger evangelism focus. It will also help in 
minimizing the constant complaints of bias I've encountered on Ajaxian.


I've already secured a position with another company and will be using 
jQuery  jQuery UI to enhance their ColdFusion-based CRM product. I will 
also be available for smaller after-hours engagements should anyone have 
a need for that.


As always, I want to thank the team, especially John, for letting me 
continue to be a part of this amazing project.


Rey...


[jQuery] Re: No longer with Ext JS - Apologies for being sent to the main group

2008-04-13 Thread Rey Bango


Sorry everyone. This was meant to go to the jQuery internal group. My 
apologies for this being sent to the main group.


Rey...

Rey Bango wrote:


Hi guys,

As of yesterday, I am no longer with Ext JS. Ext is making some big 
changes organizationally, some of which I am not in agreement with. 
Hence, I've turned in my resignation, effective immediately.


Many of the changes at Ext will be visible shortly and some will 
manifest themselves over time. Either way, their direction and decisions 
 weren't in line with my views and I felt it was best to move on.


The split is amicable and at the end of the day, is purely business.

The good thing is that I can now refocus on promoting jQuery without the 
constant concern of stepping on Ext's toes. This will be especially 
helpful to the jQuery UI team which has done a marvelous job and will 
greatly benefit from a stronger evangelism focus. It will also help in 
minimizing the constant complaints of bias I've encountered on Ajaxian.


I've already secured a position with another company and will be using 
jQuery  jQuery UI to enhance their ColdFusion-based CRM product. I will 
also be available for smaller after-hours engagements should anyone have 
a need for that.


As always, I want to thank the team, especially John, for letting me 
continue to be a part of this amazing project.


Rey...



[jQuery] Re: Appending URL and Session variables to redirect script

2008-04-13 Thread Mintyman

You know Bob, sometimes I amaze myself with stupidity! Why didn't I
think of that? Thanks!

On Apr 13, 4:24 am, Bob Woodard [EMAIL PROTECTED] wrote:
  All I need now is to figure out the syntax of moving my
  script over into a separate .js file instead of being inline.

 Instead of a separate .js, why not use an #include that would pull
 in the javascript code dynamically and resolve the variables for you?  I've
 done this to build javascript on the fly when needed.


[jQuery] Re: Appending URL and Session variables to redirect script

2008-04-13 Thread JFRanger

All I need now is to figure out the syntax of moving my script over
into a separate .js file instead of being inline.

Hello Mintyman, I'm glad to know that there is still classic asp guys
like me out there :=)

OPTION 1:

On my end I use DYNAMIC .js file to get values from the server...

script type=text/javascript src=myFile.js.asp /script

In your myFile.js.asp you have something like this:


!--#include file=conn.asp --

' here you can also connect to DB and create a RecordSet to get fresh
values !


' or simply get the server session variables

$(document).ready(function() {
$(a.dload).click(function(){
var CompanyID = %=session(CompanyID)%  ;
var UserID = %=session(UserID)% ;
var DownloadID = %=session(DownloadID)%;
$.ajax({
   type: GET,
   url: downloadtrack.asp,
   data: CompanyID= + CompanyID + UserID= + UserID +
DownloadID= + DownloadID
  });
 });
});


OPTION 2:

To get the user's values, you can do a hidden ajax request to a page
called getUserValues.asp and this page give the proper info in
simple text (or xml, jSon) and you take the values from the
responseText


Enjoy!

//JF//


[jQuery] Correct Selector syntax

2008-04-13 Thread Up-Works

I have this block of HTML:
snip
p
label for=playerNamePlayer Name: /label
input type=text name=playerName-0 class=required spell
minlength=2/
span class=spellResponse
br/nbsp;Did you mean: span
style=color:#295DAD;emstrongspan class=correctWordRobert/
span/strong/em Yes: input type=radio value=Y class=spellQ
name=spellQ No: input type=radio value=N class=spellQ
name=spellQ/spanbr//span
/p
/snip

I am using a click function on the input.spellQ that if value==Y it
grabs the text() from span.corretWord and places it in the previous
input.required.spell.

I am having trouble selecting the previous input.required spell.

Here is what I have for the funtion:

$('.spellQ').livequery('click',function() {
var qValue = $(this).val();
if(qValue == 'Y') {
var newText = $('span.correctWord').text();
var field = $('input.spell');
//This line below does not work :-(
$(this).prev(field).val(newText);
//console.log(newText);
//console.log(field);
}
});

Thank you in advance for suggestions or assistance.


[jQuery] Re: Validate plugn - Error does not go away!

2008-04-13 Thread Jörn Zaefferer


asle schrieb:

Here is a test page:
http://fjklima.no/teknisk/validate.html
  

I can confirm the issue on your testpage, but can't reproduce it.

Could you give the latest revision a try? 
http://dev.jquery.com/view/trunk/plugins/validate/


Jörn


[jQuery] Re: Immediate validation

2008-04-13 Thread Jörn Zaefferer


Taras schrieb:

Hello jQuery Team:)

Sorry for banal question, but I have not found answet to it in the
web.
So, I have simple html form and I want to validate it using jQuery
validation plugin. Everything is fine? but I want to change validation
event. In documentaion it is said that,


By default, forms are validated on submit, triggered by the user
clicking the submit button or pressing enter when a form input is
focused (option onsubmit). In addition, once a field was highlighted
as being invalid, it is validated whenever the user types something in
the field (option onkeyup). When the user enters something invalid
into a valid field, it is also validated when the field loses focus
(option onblur).


Can I change it to make validation immediate, for example onchange
event + on submit?
I was trying to configure jQuery like this :

$j(document).ready(function(){
   $j(#bookForm).validate({
defaults: {
immediate: true
},
  event: 'change',
  onsubmit: true,
  rules: {
title: {
required:   true,
maxLength:  c:out value='${BOOK_TITLE_MAXSIZE}' /
},
 


but it doesnt works for me.
Please, advise
  
There is no defaults or event option. But you can provide an onkeyup 
option that always validates:


$(...).validate({
 onkeyup: function(element) { this.element(element); },
 ...
});

Jörn


[jQuery] Re: DWR + jQuery validation plugin

2008-04-13 Thread Jörn Zaefferer


Taras schrieb:

But it doesnt work to me, because for jquery isUsernameExisted()
function always returns 'undefined' because it doesnt wait while
callback is executed.
So, is it possible to add new validation method to jquery validator
and make it capable for using my  isUsernameExisted() DWR function ?
  

Writing async validation methods via addMethod is currently not trivial.

The easiest solution is to use the remote method: 
http://docs.jquery.com/Plugins/Validation/Methods/remote#url

You just have to figure out the URL that DWR users and specify that.

If that isn't possible, you have to reimplement the remote method using 
DWR, using the current implementation as a reference.


Jörn


[jQuery] Re: jQuery plugin: Tooltip problem with disabled form fields

2008-04-13 Thread Jörn Zaefferer


james_fairhurst schrieb:

Hi,

Shameful to admit but my first post is a request for help but here
goes.

I've been using the wonderful jQuery plugin: Tooltip from
bassistance.de but I haven't been able to get it working for disabled
form input fields. I don't know whether this is an issue with HTML in
general not being able to display the title attribute or with the
plugin itself.

I've tried to specifically select the disabled inputs to no avail
with:

$('#form_style input[disabled]').tooltip();

Any help would be greatly appreciated.
  
It looks like a disabled field doesn't fire any events at all, neither 
click nor hover. I don't see any way around that.


Jörn


[jQuery] Re: Validate plugin 1.2.1 backward compatibility break

2008-04-13 Thread Jörn Zaefferer


Bryce Lohr schrieb:

Hi Jörn,

I've put together some simplified example pages showing the two main
use cases I'm having a problem with. I created two versions of each
page, one using Validate 1.1.2, and one using Validate 1.2.1. The
1.1.2 example function properly, while the 1.2.1 versions don't.

Validating a subsection of a larger form:
http://www.gearheadsoftware.com/subsect-112.html
http://www.gearheadsoftware.com/subsect-121.html
  
You can solve that by setting up validation only once and switching 
rules when necessary, something like this:


$(function() {
   // Rules just for the Financial Info subsection
   var eligibilityRules = [...]

   // Set up validation on the whole form
   var validator = $(form).validate({rules: mainRules});

   // Make the button validate the subsection on click
   $(#eligCheck).click(function(evt) {

validator.settings.rules = eligibilityRules;
var valid = $(form).valid();
validator.settings.rules = mainRules;
   // Set up validation, do it, and check results all at once
   if ( !valid ) {
   return false; 
   }


   // There would actually be an AJAX submit  server validation 
   // here

   alert(Eligible!);
   });
   });


Dynamically setting up validation for editable table rows:
http://www.gearheadsoftware.com/tableval-112.html
http://www.gearheadsoftware.com/tableval-121.html
  
This is way more complex, I don't have an immediate solution at hand.The 
validation plugin is designed around forms, which aren't available in 
this case.


A first idea that comes to mind is subclassing the validator object to 
use it for these rows. You'd have to write your own init/plugin code, 
but that shouldn't be much of a problem. Actual access to eg. 
element.form happens only in a few places, and these may not even be 
affected in this case.


Let me know if you try to implement that path and have any questions.

Jörn


[jQuery] Re: jQ Validation display:none validation

2008-04-13 Thread Jörn Zaefferer


AlexGrande.com schrieb:

Hi,

I used the jQ validation plugin for this webpage -
http://research.emedtv.com/idiopathic-pulmonary-fibrosis-research/idiopathic-pulmonary-fibrosis-clinical-study-2.html

I love it!

But we have dependent questions - see what happens when you click yes
or no to the tobacco question. Those dependent questions are written
in via JS from onclick events. I'd like to have those on the page but
when I make them hidden and the user clicks submit the validator still
tries to validate it. Solutions? Maybe the onclick displays them and
gives them the class value required?
That should work just fine. You can also remove the class required when 
hiding the element on another click.


Jörn


[jQuery] Hover Problems

2008-04-13 Thread [EMAIL PROTECTED]

I am creating my first site with jquery. (Its my first time with
javascript, and I love it)
I have most of it ready, one thing I am completely stuck on.

I have a bunch of images that when you hover over each one there
should be a div appearing. Right now when I hover over any image the
div appears on all images. I only want it to appear on the image that
you are hovering over and not on all instances of the image. I tried a
lot of things, I need some help.

my html:

 div class='item'
div class='img_cont'
  div class='item_info'264 VIEWS/div

/div
  /div

( the div that should be showing up is item_info which by default is
display:none; . )

$('.item img').hover(function() {
  $(.item_info).animate({ opacity: 'show' }, 700);
   }, function() {
 $(.item_info).animate({ opacity: 'hide' }, 700);
});


--
Right now there are about 30 of the same divs with class image and
img's in them. When I hover over any image I see all divs on all
images popping up. How do I target just that one single image div
that the mouse is over, so that I can have the div popup whenever the
mouse is only over the one image.

Thank you

- Lukas


[jQuery] Re: Validation Plugin Add Row Example

2008-04-13 Thread Jörn Zaefferer


HatemJaber schrieb:

I am using the Validation plugin from http://jquery.bassistance.de/validate/demo
which is a great plugin. I just found out after browsing the docs some
more that it has the capability of dynamically adding a row of data. I
would like to know how I can remove a row of data. After several
attempts at creating a removeJoin() function, and a couple of hours of
hacking it up, I decided to join the group.

[...]
All you need to do is to remove the row you added, eg. 
$(tr:last).remove() to remove the last row.


Jörn


[jQuery] Re: jtooltips tips only on class=toolTips

2008-04-13 Thread Jörn Zaefferer


jambla schrieb:

Hello,

I have installed jtooltips in Drupal.  I was wondering if its possible
to have the tool tips active on only titles that have a tooltips
class?
Right now, anything with a title uses jtooltips, I would like to only
use jtooltips if I have added class=toolTips.

Thanks for your help!
  
I don't know how the drupal module works or how you customize it. But 
when you use a plain tooltip plugin, its quite easy, eg. with 
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/


$(function() {
   $(.tooltips).tooltip();
});

Jörn



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

2008-04-13 Thread Jörn Zaefferer


Jacky See schrieb:

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?
  
Thats a different issue. A better dateRange implementation could reuse 
the information provided via the groups-option, or use the DOM structure 
to find the associated element.


Jörn


[jQuery] Re: ui.datepicker causes IE operation aborted

2008-04-13 Thread Junk Filter

We're using the older jQuery 1.2.1, and I've tried several methods,  
including your suggestions below. None work in that blasted browser.  
This is the declaration code I'm trying to use in our portal, adapted  
from the basic how to page for the datepicker plugin:

style type=text/css@import url(/css/jquery/ui.datepicker.css);/ 
style
script type=text/javascript src=/js/jquery/ui.datepicker.js/ 
script
This is the code that init's the date picker:

input type=text id=dateTest

script
 $.datepicker.setDefaults({showOn: 'both', buttonImageOnly: true,  
buttonImage: '/images/icons/cal.png', buttonText: 'Calendar'});
 $('#dateTest').datepicker();
 $('#dateTest').datepicker({defaultDate: +7});
/script
Tried the following approaches:

1) wrap declaration block in document.ready, as described here:

http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml

IE aborts even without code to initialize the date picker

2) declaration block in HEAD. IE aborts
3) declaration right after BODY tag, not enclosed by DIV or table  
tags. IE aborts
3) declaration right before /BODY tag. IE loads it fine
Okay, so we go with #4, and now we try adding the init code somewhere.  
Unfortunately, our pages are user-customizable (think yahoo or google  
portal), so we don't have 100% control over where the init code will  
occur--only that with Approach #4, it will be written to the page  
before the actual declaration.

So I tried wrapping the init code in a document.ready() call as well.  
Works in Firefox, IE barfs (of course), saying the datepicker object  
doesn't exist. I'm trying to force it to load after the declaration  
has in fact occurred, but IE is executing the code as it appears on a  
page.

I could force all components using the date picker to use the same  
variable name, but this is a kludge requiring a try/catch block, since  
there might be no datepicker field. And fun ensues if a user puts two  
picker-equipped portlets a page... This approach also prevents me from  
customizing the datepicker on a case-by-case basis.

Any further suggestions? Has anyone gotten it to work in IE where the  
init code is written to the browser before the declaration?

Thanks for any help.


KidsKilla .grin! wuz here wrote on Dec 12, 2007; 09:56am:
This problem caused in IE not because of jQuery bug, but because of IE  
bug.
IE doesn't allow to work with DOM untill it's fully downloaded and be  
ready.
This is why everything works fine inside $(document).ready()
there is 2 ways to fix it:
1. initialize everything in $(document).ready()
2. paste your script tags in head or directly in body tag. (i mean  
there have to be no parent tags)

search for Operation aborted
http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerProgrammingBugs





[jQuery] Re[jQuery] move duplicate record in an Array

2008-04-13 Thread Plant More Tree


Hi guys,

  if got the following code which may insert duplicate record in an Array:

  var 
userContactArray = new Array();
  var count 
= 0; 

  
$.each(item,function(j,item) {
var 
usercontacts = { id:null, contactEmail:null,
contactName:null, source:null };

usercontacts.id = item.id;

usercontacts.contactEmail = item.contactEmail;

usercontacts.contactName = item.contactName;

usercontacts.source = item.source;

userContactArray[count] = usercontacts;
count++;
  });
  }

is there anyway we can remove the duplicate record inside the Array
(userContactArray) ?

Thanks  Regards,
Mark
-- 
View this message in context: 
http://www.nabble.com/Remove-duplicate-record-in-an-Array-tp16661989s27240p16661989.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-13 Thread Web Specialist
Hi Rick. I have an app with ColdFusion and jQuery Flexigrid plugin to do
pagination for large datasets. I'm using this approach:

1) using spSelectNextN stored procedure(SQL Server). This sp is a great job
by Dan G. Switzer(
http://blog.pengoworks.com/index.cfm/2006/6/19/MSSQL-2k-Stored-Procedure-for-Pagination
)
2) using Flexigrid plugin(http://webplicity.net/flexigrid/)

With this your application will display only 10(15, 20, 50 etc)
records/page.

If you need examples please contact me.

Cheers
Marco Antonio


On 4/10/08, Rick [EMAIL PROTECTED] wrote:


 Thanks, Josh... I'll work on that route.

 Rick

 On Apr 10, 4:48 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
  Rick, if you have 10,000 records, I would say to not dump them all into
 the
  client.
 
  My suggestion would be to set everything up as if you were doing the
  pagination on the server using CF, and then change your pagination links
 so
  that they are intercepted, and used to do an ajax call to your CF
 template
  which retrieves the records.
 
  Your CF template could output the records as an html table and then send
  that html back to the client -- this html would be the argument in your
 ajax
  callback function, which would take the returned html and place it in
 the
  right place on the page.
 
  This is all independent of any plugins, just using straight jQuery and
 CF.
 
  Just as a rough outline... suppose your pagination link looks like a
  href=myCfTemplate.cfm class=paginate5/a (this would be to go to
 page
  5 of the pagination).
 
  Your ajax call would look like something like:
  $(a.paginate).click(function() {
  $.get(
  this.href,
  $(this).text(),
  outputhtml
  );
  return false;
 
  });
 
  Where outputhtml is the function that takes the returned html and
 outputs
  it to the page.  This would send the data 5 to your CF template as an
 url
  variable, which you could use to determine which records to get from the
  database.
 
  -- Josh
 
 
 
  - Original Message -
  From: Rick [EMAIL PROTECTED]
  To: jQuery (English) jquery-en@googlegroups.com
  Sent: Thursday, April 10, 2008 1:17 PM
  Subject: [jQuery] Re: How do I use ColdFusion and jQuery variables for
 
  pagination?
 
  Thanks for the reply, Josh...
 
  I think the part that I'm not understanding is the dump the whole
  query
  to the client and then the plugin takes care of the pagination.
 
  It also sounds like a memory and/or processor intensive way to get 20
  records
  per page.  If I have 10,000 records, I guess I would be getting and
  dumping
  all 10,000 records at once?
 
  I've considered taking the straight CF route with this, or perhaps
  using SQL
  to retrieve just the records I need.
 
  Would using CF or SQL be preferable for datasets composed of thousands
  of records?
 
  Rick
 
  On Apr 10, 3:31 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
   Rick - I don't know how the pagination plugin that you're using works,
 but
   there may be some sort of before event that you can use to ajax some
   variables to your CF page. Your CF template would take these variables
 and
   use them to set the startrow and maxrow values and then send back the
   result.
 
   That said, not sure why you'd need to do that if you're doing
 pagination
   on
   the client side? The idea is that you dump the whole query to the
 client
   and then the plugin takes care of the pagination.
 
   -- Josh
 
   - Original Message -
   From: Rick Faircloth [EMAIL PROTECTED]
   To: jquery-en@googlegroups.com
   Sent: Thursday, April 10, 2008 12:19 PM
   Subject: [jQuery] How do I use ColdFusion and jQuery variables for
 
   pagination?
 
Hi, all...
 
I'm a bit confused about how to get variables from jQuery that
I can use in my ColdFusion code.
 
In typical CF pagination, I use startrow and maxrows variables
to limit the query output. How would I get these variables
from the jQuery?
 
I just can't piece together what's happening.
 
Below is the jQuery I'm currently using. The total number
of records is set in the jQuery using the recordCount CF variable.
 
Thanks for any help!
 
Rick
 
script type=text/javascript
 
function pageselectCallback(page_id, jq){
$('#Searchresult').text(Showing search results
+((page_id*20)+1)+-+((page_id*20)+20));
}
 
$(document).ready(function(){
// Create pagination element
 
   
 $(#Pagination).pagination(cfoutput#get_properties.recordCount#/cfoutpu­­t,
{
items_per_page:20,
num_edge_entries: 2,
num_display_entries: 20,
callback: pageselectCallback
});
});
 
/script- Hide quoted text -
 
   - Show quoted text -- Hide quoted text -
 
  - Show quoted text -



[jQuery] figuring out cursor position between letters

2008-04-13 Thread Jack Killpatrick


Hi All,

I'm wondering if anyone might have any thoughts about how to go about 
this (via jQuery or plain js)...


I have a div with some text in it:

div id=myDivThis is some text/div

I want to be able to obtain the cursor position if the user clicks 
anywhere between letters/words in the div. IE, if they click between the 
h and the i in This, I want to be able to know that they clicked 
between letters 2 and 3 (or 1 and 2 in an 0-based array).


I don't want to try to get a cursor position in a textarea: the content 
will be in a div or other non-editable node. I'm not opposed to having 
to create an invisible textarea dynamically if that might help in some 
way (can't think of how it might, though).


Any ideas?

Thanks,
Jack




[jQuery] Re: Correct Selector syntax

2008-04-13 Thread Karl Swedberg


Hi there,

Probably the easiest way -- provided that the group of inputs is  
always contained within a paragraph -- is to do this:


$(this).parents('p').find('input.required.spell').val(newText);

The .prev() method selects the immediately previous sibling element.  
Your radio buttons have no siblings other than each other (and text  
nodes, which aren't included in jQuery selectors).


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Apr 13, 2008, at 12:34 PM, Up-Works wrote:



I have this block of HTML:
snip
p
label for=playerNamePlayer Name: /label
input type=text name=playerName-0 class=required spell
minlength=2/
span class=spellResponse
br/nbsp;Did you mean: span
style=color:#295DAD;emstrongspan class=correctWordRobert/
span/strong/em Yes: input type=radio value=Y class=spellQ
name=spellQ No: input type=radio value=N class=spellQ
name=spellQ/spanbr//span
/p
/snip

I am using a click function on the input.spellQ that if value==Y it
grabs the text() from span.corretWord and places it in the previous
input.required.spell.

I am having trouble selecting the previous input.required spell.

Here is what I have for the funtion:

$('.spellQ').livequery('click',function() {
var qValue = $(this).val();
if(qValue == 'Y') {
var newText = $('span.correctWord').text();
var field = $('input.spell');
   //This line below does not work :-(
$(this).prev(field).val(newText);
//console.log(newText);
//console.log(field);
}
});

Thank you in advance for suggestions or assistance.




[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-13 Thread Rick Faircloth
Thanks for the tip, Marco.

 

Rick

 

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Web 
Specialist
Sent: Sunday, April 13, 2008 2:42 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: How do I use ColdFusion and jQuery variables for 
pagination?

 

Hi Rick. I have an app with ColdFusion and jQuery Flexigrid plugin to do 
pagination for large
datasets. I'm using this approach:

 

1) using spSelectNextN stored procedure(SQL Server). This sp is a great job by 
Dan G.
Switzer(http://blog.pengoworks.com/index.cfm/2006/6/19/MSSQL-2k-Stored-Procedure-for-Pagination)

2) using Flexigrid plugin(http://webplicity.net/flexigrid/)

 

With this your application will display only 10(15, 20, 50 etc) records/page.

 

If you need examples please contact me.

 

Cheers

Marco Antonio

 

On 4/10/08, Rick [EMAIL PROTECTED] wrote: 


Thanks, Josh... I'll work on that route.

Rick

On Apr 10, 4:48 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
 Rick, if you have 10,000 records, I would say to not dump them all into the
 client.

 My suggestion would be to set everything up as if you were doing the
 pagination on the server using CF, and then change your pagination links so
 that they are intercepted, and used to do an ajax call to your CF template
 which retrieves the records.

 Your CF template could output the records as an html table and then send
 that html back to the client -- this html would be the argument in your ajax
 callback function, which would take the returned html and place it in the
 right place on the page.

 This is all independent of any plugins, just using straight jQuery and CF.

 Just as a rough outline... suppose your pagination link looks like a
 href=myCfTemplate.cfm class=paginate5/a (this would be to go to page
 5 of the pagination).

 Your ajax call would look like something like:
 $(a.paginate).click(function() {
 $.get(
 this.href,
 $(this).text(),
 outputhtml
 );
 return false;

 });

 Where outputhtml is the function that takes the returned html and outputs
 it to the page.  This would send the data 5 to your CF template as an url
 variable, which you could use to determine which records to get from the
 database.

 -- Josh



 - Original Message -
 From: Rick [EMAIL PROTECTED]
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Thursday, April 10, 2008 1:17 PM
 Subject: [jQuery] Re: How do I use ColdFusion and jQuery variables for

 pagination?

 Thanks for the reply, Josh...

 I think the part that I'm not understanding is the dump the whole
 query
 to the client and then the plugin takes care of the pagination.

 It also sounds like a memory and/or processor intensive way to get 20
 records
 per page.  If I have 10,000 records, I guess I would be getting and
 dumping
 all 10,000 records at once?

 I've considered taking the straight CF route with this, or perhaps
 using SQL
 to retrieve just the records I need.

 Would using CF or SQL be preferable for datasets composed of thousands
 of records?

 Rick

 On Apr 10, 3:31 pm, Josh Nathanson [EMAIL PROTECTED] wrote:
  Rick - I don't know how the pagination plugin that you're using works, but
  there may be some sort of before event that you can use to ajax some
  variables to your CF page. Your CF template would take these variables and
  use them to set the startrow and maxrow values and then send back the
  result.

  That said, not sure why you'd need to do that if you're doing pagination
  on
  the client side? The idea is that you dump the whole query to the client
  and then the plugin takes care of the pagination.

  -- Josh

  - Original Message -
  From: Rick Faircloth [EMAIL PROTECTED]
  To: jquery-en@googlegroups.com
  Sent: Thursday, April 10, 2008 12:19 PM
  Subject: [jQuery] How do I use ColdFusion and jQuery variables for

  pagination?

   Hi, all...

   I'm a bit confused about how to get variables from jQuery that
   I can use in my ColdFusion code.

   In typical CF pagination, I use startrow and maxrows variables
   to limit the query output. How would I get these variables
   from the jQuery?

   I just can't piece together what's happening.

   Below is the jQuery I'm currently using. The total number
   of records is set in the jQuery using the recordCount CF variable.

   Thanks for any help!

   Rick

   script type=text/javascript

   function pageselectCallback(page_id, jq){
   $('#Searchresult').text(Showing search results
   +((page_id*20)+1)+-+((page_id*20)+20));
   }

   $(document).ready(function(){
   // Create pagination element

   $(#Pagination).pagination(cfoutput#get_properties.recordCount#/cfoutpu--t,
   {
   items_per_page:20,
   num_edge_entries: 2,
   num_display_entries: 20,
   callback: pageselectCallback
   });
   });

   /script- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -

 



[jQuery] Re: Hover Problems

2008-04-13 Thread Jake McGraw

You have to scope the hover to the current image, otherwise all div
with class item_info will show up (because, by default $(selector)
operates on the entire document, like $(selector, document)), here
is how you do this:

Assuming an HTML structure like this:

 div class='item'
   div class='img_cont'
 div class='item_info'264 VIEWS/div
 img src=some-img.gif/
   /div
 /div

$('.item img').hover(function() {
 $(this).siblings(.item_info).animate({ opacity: 'show' }, 700);
  }, function() {
 $(this).siblings(.item_info).animate({ opacity: 'hide' }, 700);
});

Check out the documentation for how selectors work here:

http://docs.jquery.com/Core/jQuery#expressioncontext

and here:

http://docs.jquery.com/Selectors



- jake


On Sun, Apr 13, 2008 at 12:46 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  I am creating my first site with jquery. (Its my first time with
  javascript, and I love it)
  I have most of it ready, one thing I am completely stuck on.

  I have a bunch of images that when you hover over each one there
  should be a div appearing. Right now when I hover over any image the
  div appears on all images. I only want it to appear on the image that
  you are hovering over and not on all instances of the image. I tried a
  lot of things, I need some help.

  my html:

   div class='item'
 div class='img_cont'
   div class='item_info'264 VIEWS/div

 /div
   /div

  ( the div that should be showing up is item_info which by default is
  display:none; . )

  $('.item img').hover(function() {
   $(.item_info).animate({ opacity: 'show' }, 700);
}, function() {
   $(.item_info).animate({ opacity: 'hide' }, 700);
  });


  --
  Right now there are about 30 of the same divs with class image and
  img's in them. When I hover over any image I see all divs on all
  images popping up. How do I target just that one single image div
  that the mouse is over, so that I can have the div popup whenever the
  mouse is only over the one image.

  Thank you

  - Lukas



[jQuery] jquery library to smoothly swap out DIVs

2008-04-13 Thread [EMAIL PROTECTED]

Hi,

I want to mimic functionality on this page ...

http://www.gomow.com/service.shtml

with the exception that when you click on a link in the center the
middle section swaps out without the page reloading.  It would be nice
that upon clicking a link, a hash appears in the URL.

Any ideas about a JQuery library that might do this?  Thanks, - Dave



[jQuery] Re: how to select?

2008-04-13 Thread Karl Swedberg


Hi tetris,

You're almost there. Rather than event.stopPropagation(), try  
event.preventDefault() or return false.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Apr 13, 2008, at 3:41 AM, tetris wrote:



I have been trying to select the a tags in a ulli config. with
no succes:

$(document).ready(function() {
$('#sub-portfolio .button').click(function(event) {
$('#sub-portfolio .button').removeClass('selected');
$(this).addClass('selected');
event.stopPropagation();
});
});



html part:

ul id=sub-portfolio
li class=buttona href=Print/a/li
li class=button id=webWeb/li
li class=buttonVideo/li
/ul


my goal is that each time you click a li it gets the 'selected'
class(so only one li has the 'selected' class at a time), the
function works if i remove the a href part from the li but i need
this part or i loose the hover class, so my problem is that im unable
to reach the a href part with this selector: $('#sub-
portfolio .button')

any help would be appreciated




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

2008-04-13 Thread Jacky
I'm thinking if I can do this:

rules:{
planFromDate: {dateRange:'plan'}, planToDate: {dateRange:'plan'}
actualFromDate: {dateRange:'actual'}, actualToDate: {dateRange:'actual'}
}
groups: {
dateRange: planFromDate planToDate actualFromDate actualToDate
}

$.validator.addMethod('dateRange',function(value,elem,param){
var f = $(elem).parents(form:eq(0))[0];
from = f[param+'FromDate'].value;
to = f[param+'ToDate'].value;
if(!from || !to ||
/Invalid|NaN/.test(new Date(from)) ||
/Invalid|NaN/.test(new Date(to)))
return true;
return from  to  new Date(from)  new Date(to);
},'wrong date range');

But it seems that it will only output single message.

On Mon, Apr 14, 2008 at 1:07 AM, Jörn Zaefferer [EMAIL PROTECTED] wrote:


 Jacky See schrieb:

  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?
 
 
 Thats a different issue. A better dateRange implementation could reuse the
 information provided via the groups-option, or use the DOM structure to find
 the associated element.

 Jörn




-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net