3

I know, that joomla 3.x uses bootstrap, both css and js. When I am filling in the registration form and my password is too short for example, I start getting those javascript tooltip error messages. I have added an ajax call to the registration where I check the availability of the username and email. I am getting my string message back succesfully with jQuery ajax. But How can I add that message to my username input field to be shown at the other tooltips?

Thank you!

1 Answer 1

3

I've got it!!! You have to include:

JHtml::_('behavior.framework');

and the javascript is something like this:

jQuery("#user_name").attr('title','Kérem előbb válassza ki a hatályba lépés dátumát!');
jQuery("#user_name").tooltip('show');

Make sure that these two line are in the done method of your jquery ajax call.

Then you have to destroy it:

jQuery("#user_name").click(function(){
        jQuery("#user_name").tooltip('destroy');
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.