Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: [ADDED] Save Button for JQuery

Re: [SOLVED] Save Button not working on front-end of component 30 Jul 2012 18:58 #2931

  • rasia
  • rasia's Avatar
  • Offline
  • New Member
  • Posts: 9
  • Karma: 0
I have the same issue (both in back-end and front-end). If i make working jQuery, then save button doesn't work and apposite around. Experimenting already second day, but i have no solution. Plugin Easy Query helps to solve the problem, but at the same time it stops working other components.

I really hope to find a solution and if someone would share experience in this case i would really appreciate it.
The administrator has disabled public write access.

Re: [SOLVED] Save Button not working on front-end of component 30 Jul 2012 19:08 #2932

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
MooTools is used in the formvalidator for very few basic cross-browser functionalities.

I am trying to remove all this and use only JS native functionalities. It is on the way.

Thank for patience.

J.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: [SOLVED] Save Button not working on front-end of component 30 Jul 2012 19:45 #2933

  • rasia
  • rasia's Avatar
  • Offline
  • New Member
  • Posts: 9
  • Karma: 0
Finaly found a solution!!!

My jQuery script now looks like this:


$doc = JFactory::getDocument();
$doc->addScript('ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js');

$js = 'jQuery.noConflict();
window.addEvent("domready", function() {
jQuery("#kategorija").css("visibility","hidden");
jQuery("#visosKategorijos ").change(function() {
jQuery("#kategorija").val(jQuery("#visosKategorijos option:selected").val());
});
})
';

$doc->addScriptDeclaration($js);

I added:

jQuery.noConflict();

and used jQuery instead of $

I'm not sure if i have to everytime include $doc->addScript('ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js'); but i have tried in 3 components in the same joomla and it works.


Please try it for now until this case with be solved correctly.

Regards
The administrator has disabled public write access.

Re: [SOLVED] Save Button not working on front-end of component 31 Jul 2012 06:35 #2937

  • rasia
  • rasia's Avatar
  • Offline
  • New Member
  • Posts: 9
  • Karma: 0
It looks like my offered solution works just for back-end, because i couldn't make work it in front-end. At least it solves problems in back-end :)
Last Edit: 31 Jul 2012 06:35 by rasia.
The administrator has disabled public write access.

Re: [SOLVED] Save Button not working on front-end of component 18 Sep 2012 15:39 #3745

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Hi,

wherever you're using jQuery in the front-end, try to ensure that you call it like;
jQuery(function($) {
    // Your code using failsafe $ alias here...
  });
as opposed to;
$(function() {
    // Your code 
  });

I think the problems you're experiencing arise out of common conflicts arising out of $ shortcut in mootools and jquery.

Hope this helps,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: Save Button not working on front-end of component 21 Nov 2012 07:21 #5530

  • mark d
  • mark d's Avatar
Bellow is shown the example how to add custom classes in jQuery UI Dialog (Version 1.8+):

$('#foo').dialog({

'buttons' : {

'cancel' : {

priority: 'secondary', class: 'foo bar baz', click: function() {

...

},

},

}

});
The administrator has disabled public write access.

Re: Save Button not working on front-end of component 21 Nov 2012 08:51 #5541

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
@mark d,

I have to ask, what exactly is the relevance ofmark d wrote:
Bellow is shown the example how to add custom classes in jQuery UI Dialog (Version 1.8+):
in a thread that is explicitly about the joomla save button. Granted, jQuery did come up in the thread but, a dialog?!!!

Please, I cannot spend all day responding to irrelevant posts!

As I said before, we really welcome everyone's contributuon here as long as it's relevant to the topic, threads, COOK and Joomla (including JS frameworks).

Thanks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
Last Edit: 21 Nov 2012 09:00 by JoomGuy. Reason: typo - dialog
The administrator has disabled public write access.
The following user(s) said Thank You: admin
  • Page:
  • 1
  • 2
Time to create page: 0.071 seconds

Get Started