[jQuery] Re: [validate] dynamic message

2009-02-08 Thread himanshu

Hi,

I am trying to validate an optional field but it is validated every
time either it is included or not on the form.Please help me that how
can i validate optional fields using jQuery validator.

Regards,
Himanshu Singh

On Jan 26, 3:18 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Try this workaround - updatevalidator.settings.messages[element.name]
 with the appropiate value inside your validation method:

 $.validator.addMethod(dynamic_check, function(value, element, param) {
       if(incorrect(value, param)){
         this.settings.messages[element.name] = some dynamic message
 + dynamicValue;
         return false;
       }

 }, whatever));
 On Sun, Jan 25, 2009 at 10:33 PM, thomas thomas.bik...@gmail.com wrote:

  Thanks Jörn,

  but is there a way to change param dynamically during JS runtime?

  As example in your custom-methods-demo.html I'd like 11 to be a
  function of value ...
  math: {equal: 11}

  In my barcoding example, I'd like not only tell user that barcode
  number is wrong, but also what the check digit should be for what he
  has typed. In order to pass it into template Entered number is wrong
  the check digit must be {0} I need to be able to alter param
  somehow ...

  Regards,
  Thomas

  On Jan 25, 2:29 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:
  You can use $.format to create dynamic messages, but that works only
  when the dynamic part is specified as a parameter.

  $.validator.addMethod(dynamic_check, function(value, element, param) {
         if(incorrect(value, param)){
         return false;}

  }, $.format('dynamic message goes here with param {0}'));

  Jörn

  On Sat, Jan 24, 2009 at 10:54 AM, thomas thomas.bik...@gmail.com wrote:

   Hello group!

   Very happy to have deployed validation plugin ( I mostly need to check
   validity of EAN/UPC numbers for barcode generation). You can see it in
   action here:http://www.barcoderobot.com/ean-13.html

   The question I am struggling with though is howto return a
   'dynamically generated' message. Say, '13 digits are required, you
   have XX'?

   $.validator.addMethod(dynamic_check, function(value) {
          if(_value is incorrect_){
          return False;}
   }, 'dynamic message goes here');


[jQuery] How to use validator in my existing HTML pages

2009-02-04 Thread himanshu

Hi,

I have to apply jQuery validation on my existing HTML page using From
Validator Plug-in. But it is not working.
Can any one help me with some sample How I can apply jQuery validation
on my existing HTML pages without changing much in existing tags.

Thanks,
Himanshu


[jQuery] Re: [treeview]

2009-01-30 Thread himanshu khatri
jorn didnt quiet get what you meant...
 the only hint i have found is 
http://drupal.org/node/271463

i hope this helps others aswell who have
this error
$.cookie is not a function



On Fri, Jan 30, 2009 at 7:30 PM, Jörn Zaefferer 
joern.zaeffe...@googlemail.com wrote:


 See http://www.trinityindia.org/jquery.cookie.js

 Jörn

 On Fri, Jan 30, 2009 at 11:05 AM, kryptos himanshu1kha...@gmail.com
 wrote:
 
  Greets ...
 
  when i run the tree~menu locally .it works like a breeze.
  when i load it up on the webserverit freezes.firebug tells me
  the error is at line 176 in  jquery.treeview.js
 
  the code in that line is 
  var stored = $.cookie(settings.cookieId);
 
  the error is 
  $.cookie is not a function
 
  URL
  www.trinityindia.org
 
  the error persists in all the browsers.3 days down alreadyhave
  no clue...
 
  do help :)
 
 
 
 
 




-- 
Cheers and Greets

M e d i a s h a l a

Himanshu Khatri
National Design Business Incubatee - (NDBI)
NID, Paldi,
Ahmedabad 380 007, India.
Phone:(079) 2662 3692 (extn - 5008)
Mo:+91 9725111531
@:  himanshu1kha...@gmail.com
 himan...@mediashala.com
Skype:himanshu1khatri


[jQuery] Re: [treeview]

2009-01-30 Thread himanshu khatri
exactly the point..
the file is there...its just being blocked or something but the webhost...

On Fri, Jan 30, 2009 at 9:11 PM, Jörn Zaefferer 
joern.zaeffe...@googlemail.com wrote:


 The jquery.cookie.js file is missing. You didn't upload it, or it
 links to the wrong location.

 Jörn

 On Fri, Jan 30, 2009 at 3:48 PM, himanshu khatri
 himanshu1kha...@gmail.com wrote:
  jorn didnt quiet get what you meant...
   the only hint i have found is 
  http://drupal.org/node/271463
 
  i hope this helps others aswell who have
  this error
  $.cookie is not a function
 
 
 
  On Fri, Jan 30, 2009 at 7:30 PM, Jörn Zaefferer
  joern.zaeffe...@googlemail.com wrote:
 
  See http://www.trinityindia.org/jquery.cookie.js
 
  Jörn
 
  On Fri, Jan 30, 2009 at 11:05 AM, kryptos himanshu1kha...@gmail.com
  wrote:
  
   Greets ...
  
   when i run the tree~menu locally .it works like a breeze.
   when i load it up on the webserverit freezes.firebug tells me
   the error is at line 176 in  jquery.treeview.js
  
   the code in that line is 
   var stored = $.cookie(settings.cookieId);
  
   the error is 
   $.cookie is not a function
  
   URL
   www.trinityindia.org
  
   the error persists in all the browsers.3 days down alreadyhave
   no clue...
  
   do help :)
  
  
  
  
  
 
 
 
  --
  Cheers and Greets
 
  M e d i a s h a l a
 
  Himanshu Khatri
  National Design Business Incubatee - (NDBI)
  NID, Paldi,
  Ahmedabad 380 007, India.
  Phone:(079) 2662 3692 (extn - 5008)
  Mo:+91 9725111531
  @:  himanshu1kha...@gmail.com
   himan...@mediashala.com
  Skype:himanshu1khatri
 




-- 
Cheers and Greets

M e d i a s h a l a

Himanshu Khatri
National Design Business Incubatee - (NDBI)
NID, Paldi,
Ahmedabad 380 007, India.
Phone:(079) 2662 3692 (extn - 5008)
Mo:+91 9725111531
@:  himanshu1kha...@gmail.com
 himan...@mediashala.com
Skype:himanshu1khatri


[jQuery] Disable Page Refresh

2009-01-03 Thread Himanshu Rathore
Hi,

Is there a way to disable page refresh option - F5, Ctrl+F5, Menu  Refresh
/ Reload, Right Click Refresh?

Regards,
Himanshu Rathore