user915755 user915755 - 2 years ago 203
Javascript Question

Extjs + jQuery together

How to use

function and jQuery together ?

I have used ext js for generating tree and I want to use jQuery for validation of some textfield values.

Or any other way to validate textfield using extjs?

Answer Source

Ext has built-in validation via textfield configs for some things (e.g. allowBlank: false) and validator functions for others (all of the VTypes functions), and also hooks for providing custom validation. Not sure why you'd need to add jQuery just for that, maybe you can be more specific?

But assuming you really do need to use both, you should be able to use either Ext's or jQuery's DOM ready function as your entry point (not both), and then write whatever code you need inside of it assuming both libraries are properly referenced and initialized. Assuming that each library's DOM ready function works as advertised, the DOM should be available when either one is called, which is the only point of using those methods anyway. Since you are using Ext widgets I would probably stick with Ext.onReady just to be on the safe side, but in theory it really shouldn't matter which function you use.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download