[jQuery] Jquery Treeview - trigger a collapse programatically

2009-10-05 Thread bj

I'm using Treeview and I need to be able to tell it to collapse via
Javascript (as in, from another function outside of the Treeview
code). I have searced everywhere for a how-to and can't figure it out.

I'm hoping someone can suggest a way of doing it.


[jQuery] Re: Validate.js problem

2007-06-20 Thread BJ Clark


This is why I'm so confused.
The code in the demo is:
$("#form2").validate({
errorContainer: container,
errorLabelContainer: $("ol", container),
wrapper: 'li',
meta: "validate",
event: "keyup"
});

My code is:
$("#order").validate({
errorContainer: $("#messagebox"),
errorLabelContainer: $("p", "#messagebox")
});

Also, in the forms:
Demo Code:  

My code:


It seems like I'm using the exact same code, but the demo works and
mine doesn't. I don't understand.

BJ Clark


On 6/20/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


BJ Clark wrote:
> exception occured when checking element , check the 'validate' method
That gives you a good idea about the problem. There is no validation
method called "validate". Seems like your setup has a problem. Check the
docs and demo pages for examples on how to setup validation rules via
metadata, or just use the plugin options to specify rules, which I can
recommend.

--
Jörn Zaefferer

http://bassistance.de




[jQuery] Re: Validate.js problem

2007-06-20 Thread BJ Clark


Jorn:
Thanks, I was using an old version.
I've updated my code:
$("#order").validate({
  errorContainer: $("#messagebox"),
errorLabelContainer: $("p", "#messagebox"),
debug: true
});

However, I'm still getting an error:

exception occured when checking element , check the 'validate'
methodjquery.validate.j... (line 14)
jQuery.validator.methods[rule.method] has no properties
[Break on this error]
eval(function(p,a,c,k,e,r){e=function(c){return(c wrote:


BJ Clark wrote:
> Can anyone give me some suggestions?
For a start, it looks like you are using a rather old version of the
validation plugin. If so, please give 1.0 a try:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
The class="$v(required)" syntax was used by one of the very first
versions of the plugin and is now replaced by the metadata syntax:
class="{required:true}".

--
Jörn Zaefferer

http://bassistance.de




[jQuery] Validate.js problem

2007-06-20 Thread BJ Clark


Hello,
I'm using the validate.js plugin.

I am using the following code:
$("#order").validate({
  errorLabelContainer: $("#messageBox"),
wrapper: "p",
debug: true
});

When my form has an error, I get the following error (in firebug):

could not find id/name for element, please check the element (see next
line)validate.js (line 195)
validate.js (line 196)
could not find any error labels for element

I have a div called messagebox, but I have not created any "error
labels" because I'd rather print out all the erorrs at the top of the
form.

I'm not really sure what I'm doing wrong here because I've never used
this plugin.

Can anyone give me some suggestions?

Thanks,
BJ Clark