[jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah
I am trying to put all my errors in a div that is the 3rd column. I then want 
to set there position so it is level with the element.
But when I run it I get no error messages

Here is my code:
  errorPlacement: function(error, element)  {
errordiv=$('.insidePage_error div');  error.appendTo(errordiv);
//var offset = $(element).offset();//error.css({'top' : offset.top, 
'position' : 'absolute' });   },


Re: [jQuery] Validation error placement

2009-11-18 Thread Jörn Zaefferer
Take a look at the milk-demo here:
http://jquery.bassistance.de/validate/demo/milk
The messages are placed in the column next to the input element, that should
be close to what you are looking for.

Jörn

2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com

  I am trying to put all my errors in a div that is the 3rd column. I
 then want to set there position so it is level with the element.
 But when I run it I get no error messages

 Here is my code:
   errorPlacement: function(error, element)  {
errordiv=$('.insidePage_error div');
  error.appendTo(errordiv);//var offset =
 $(element).offset();//error.css({'top' : offset.top, 'position' :
 'absolute' });   },



Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah
That's actualy what I was looking at... But I'm not using a table layout. So 
instead I want them to go into a special error div with class insidePage_error
And so I got these 2 lines
  errordiv=$('.insidePage_error div');  error.appendTo(errordiv);


I also tried
Errordiv.appendChild(error);
 but that didn't work either
On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote:

Take a look at the milk-demo here: 
http://jquery.bassistance.de/validate/demo/milk
The messages are placed in the column next to the input element, that should be 
close to what you are looking for.

Jörn

2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com
I am trying to put all my errors in a div that is the 3rd column. I then want 
to set there position so it is level with the element.
But when I run it I get no error messages

Here is my code:
  errorPlacement: function(error, element)   {
errordiv=$('.insidePage_error div');  error.appendTo(errordiv); 
//var offset = $(element).offset();//error.css({'top' : offset.top, 
'position' : 'absolute' });   },




Re: [jQuery] Validation error placement

2009-11-18 Thread Jörn Zaefferer
Do you have only a single element? Then use the errorLabelContainer option.
Or one for each input? Then you need to make that selector relative to the
current input; currently you select the same div for each input.

Jörn

On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah 
sarah.atkin...@cookmedical.com wrote:

  That’s actualy what I was looking at... But I’m not using a table layout.
 So instead I want them to go into a special error div with class
 “insidePage_error”
 And so I got these 2 lines

   errordiv=$('.insidePage_error div');  error.appendTo(errordiv);



 I also tried
 Errordiv.appendChild(error);
  but that didn’t work either

 On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

 Take a look at the milk-demo here:
 http://jquery.bassistance.de/validate/demo/milk
 The messages are placed in the column next to the input element, that
 should be close to what you are looking for.

 Jörn

 2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com

 I am trying to put all my errors in a div that is the 3rd column. I then
 want to set there position so it is level with the element.
 But when I run it I get no error messages

 Here is my code:
   errorPlacement: function(error, element)   {
errordiv=$('.insidePage_error div');
  error.appendTo(errordiv); //var offset =
 $(element).offset();//error.css({'top' : offset.top, 'position' :
 'absolute' });   },






Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah

Yes I have only one container
Ok so I will use the errorLabelContainer

Now after I do that can I use the offset to alter the css on each of the error 
labels to be equal to the offset of the offending element?
Or should a create custom method that runs after validation runs repositions 
everything?

On 11/18/09 1:55 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote:

Do you have only a single element? Then use the errorLabelContainer option. Or 
one for each input? Then you need to make that selector relative to the current 
input; currently you select the same div for each input.

Jörn

On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah 
sarah.atkin...@cookmedical.com wrote:
That's actualy what I was looking at... But I'm not using a table layout. So 
instead I want them to go into a special error div with class insidePage_error
And so I got these 2 lines

  errordiv=$('.insidePage_error div');  error.appendTo(errordiv);


I also tried
Errordiv.appendChild(error);
 but that didn't work either

On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com 
http://joern.zaeffe...@googlemail.com  wrote:

Take a look at the milk-demo here: 
http://jquery.bassistance.de/validate/demo/milk
The messages are placed in the column next to the input element, that should be 
close to what you are looking for.

Jörn

2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com 
http://sarah.atkin...@cookmedical.com 
I am trying to put all my errors in a div that is the 3rd column. I then want 
to set there position so it is level with the element.
But when I run it I get no error messages

Here is my code:
  errorPlacement: function(error, element)   {
errordiv=$('.insidePage_error div');  error.appendTo(errordiv); 
//var offset = $(element).offset();//error.css({'top' : offset.top, 
'position' : 'absolute' });   },






Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah

Ok so I switched to
 errorLabelContainer: .insidePage_error,
But that div still isn't getting any errors into it.

On 11/18/09 1:55 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote:

Do you have only a single element? Then use the errorLabelContainer option. Or 
one for each input? Then you need to make that selector relative to the current 
input; currently you select the same div for each input.

Jörn

On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah 
sarah.atkin...@cookmedical.com wrote:
That's actualy what I was looking at... But I'm not using a table layout. So 
instead I want them to go into a special error div with class insidePage_error
And so I got these 2 lines

  errordiv=$('.insidePage_error div');  error.appendTo(errordiv);


I also tried
Errordiv.appendChild(error);
 but that didn't work either

On 11/18/09 12:00 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com 
http://joern.zaeffe...@googlemail.com  wrote:

Take a look at the milk-demo here: 
http://jquery.bassistance.de/validate/demo/milk
The messages are placed in the column next to the input element, that should be 
close to what you are looking for.

Jörn

2009/11/18 Atkinson, Sarah sarah.atkin...@cookmedical.com 
http://sarah.atkin...@cookmedical.com 
I am trying to put all my errors in a div that is the 3rd column. I then want 
to set there position so it is level with the element.
But when I run it I get no error messages

Here is my code:
  errorPlacement: function(error, element)   {
errordiv=$('.insidePage_error div');  error.appendTo(errordiv); 
//var offset = $(element).offset();//error.css({'top' : offset.top, 
'position' : 'absolute' });   },