TOPIC:

Button script 3 weeks 4 days ago #278809

  • Topic Author
  • vyga74
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Hello,

Created button to print barcode(script). From administrator site it works, from site no :(
Problem I found that is :

$(document).ready(function()
{
// Sort Barcode Type List
var sel = $(Sel_BarcodeType);
var selected = sel.val();
var opts_list = sel.find('option');
opts_list.sort(function (a, b) {
return $(a).text() > $(b).text() ? 1 : -1;
});
sel.html('').append(opts_list);
sel.val(selected);
});

error: "undefined is not a function ('near ..$(document).ready...)"

May be somebody knows what to do ?

Please Log in or Create an account to join the conversation.

Button script 3 weeks 4 days ago #278810

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11753
  • Karma: 3
  • Thanks: 761
Hi,

please try like this:
jQuery(document).ready(function(){
// Sort Barcode Type List
var sel = jQuery(Sel_BarcodeType);
var selected = sel.val();
var opts_list = sel.find('option');
opts_list.sort(function (a, b) {
return $(a).text() > $(b).text() ? 1 : -1;
});
sel.html('').append(opts_list);
sel.val(selected);
});


Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Button script 3 weeks 4 days ago #278812

  • Topic Author
  • vyga74
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
In Element Static Text/HTML

Please Log in or Create an account to join the conversation.

Button script 3 weeks 4 days ago #278814

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11753
  • Karma: 3
  • Thanks: 761
Hi,

please test the code from message above :)

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Button script 3 weeks 4 days ago #278815

  • Topic Author
  • vyga74
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Now can't find variable JQuery ....

Please Log in or Create an account to join the conversation.

Button script 3 weeks 4 days ago #278816

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11753
  • Karma: 3
  • Thanks: 761
Hi,

I am not sure that I undestood you where you add the code, you add it in element->Advacned->Actionscript->check change->check Custom or?

Please make a screenshot

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.052 seconds

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!