TOPIC:

Populate Select list action 8 months 1 week ago #238379

  • Topic Author
  • itfirstaid
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 3
  • Thanks: 0
Hello,
I am Getting issue of "Undefined function". I want to populate another select list on change of first select list.
The problem is in fire an event. In console 2 errors are:
1. Unexpected identifier: in ff_getElementByName

2. ff_make_action is not defined at HTMLSelectElement.onchange

Can you help me out to resolve this issue?

Here is my code:
function ff_make_action(element,action){
switch (action) {
case 'change':
// pop make fld
var selname = ff_getElementByName(element.name);
if (ff_getElementByName(element.name).value){
ff_getElementByName('vMake').value = selname[selname.selectedIndex].text;}
//<<<<
value=ff_selectedValues('make');
//alert("<?php return JURI::root(true ); ?>/media/breezingforms/formsapps/truecut/make.php");
//alert(ff_getElementByName('make').value);
//alert("<?php return JURI::root(true ); ?>/media/breezingforms/formsapps/truecut/make.php"+"?ddd="+ff_getElementByName('make').value);
msg=JQuery.ajax({
type: "POST",
url: "<?php return JURI::root(true ); ?>/media/breezingforms/formsapps/truecut/make.php"+"?ddd="+ff_getElementByName('make').value,
//data: {"rec_id":element.value}, //the value to send to the php file
dataType: 'json',
async:false,
success: function(msg){
return msg;
//alert("hello1");

}
}).responseText;

//myDataArray=msg;
myDataArray='';
myDataArray2=JSON.parse(myDataArray);
//alert("hello");
edits= ff_getElementByName('model');
//alert(myDataArray);
edits.options.length=0;
edits.options[0] = new Option('Select Model','',true,true);
for (var i=0; i <myDataArray2.length; i++){

//edits.options[i+1] = new Option(myDataArray2.name, myDataArray2.id, myDataArray2.fourwd);
edits.options[i+1] = new Option(myDataArray2.name, myDataArray2.id);
}


break;
default:;
} // switch
}
Thanks in advance.
Looking forward to hear from you soon.

Regards,
Jerry

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

Populate Select list action 8 months 52 minutes ago #238477

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 413
Hello,

Please see how the same issue is resolved in this topic crosstec.org/en/forums/3-breezingforms-f...-from-db.html#237620 .

Here it is explained how to fill in a select list based on another select list.

Regards,

Mihaela
The following user(s) said Thank You: itfirstaid

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.044 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

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

Summer 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!