TOPIC:

Button script 2 months 2 weeks ago #278809

  • Topic Author
  • vyga74
  • Offline
  • New Member
  • New Member
  • Registered
  • 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 2 months 2 weeks ago #278810

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 778
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 2 months 2 weeks ago #278812

  • Topic Author
  • vyga74
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 11
  • Thanks: 0
In Element Static Text/HTML

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

Button script 2 months 2 weeks ago #278814

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 778
Hi,

please test the code from message above :)

Regards,
Tihana

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

Button script 2 months 2 weeks ago #278815

  • Topic Author
  • vyga74
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 11
  • Thanks: 0
Now can't find variable JQuery ....

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

Button script 2 months 2 weeks ago #278816

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 778
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.058 seconds

Support Discord

Join our Discord and enter the Crosstec channels for live-support, chat forums and directly interacting with the community!

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

Subscribe to news and updates!

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!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!