Variable Auswahlfelder erstellen ??

  • Posts: 13
  • Karma: 1
  • Thank you received: 1

Problem/L replied the topic: Re: Variable Auswahlfelder erstellen ??

Wer nicht lange Suchen will der code heißt
function ff_CselRegion_action(element, action)
    country = ff_getElementByName('CselCountry');
    state   = ff_getElementByName('CselState');

    var africaArray = new Array(
        'Ethiopia', 'Somalia', 'South Africa', 'Other'

    var middleeastArray = new Array(
        'Egypt', 'Iran', 'Israel', 'Kuwait', 'Lebanon', 'Morocco',
        'Saudi Arabia', 'Syria', 'Turkey', 'U.A.Emirates', 'Other'

    var asiaArray = new Array(
        'Armenia', 'Bangladesh', 'Cambodia', 'China', 'India', 'Indonesia',
        'Japan', 'Malaysia', 'Myanmar', 'Nepal', 'Pakistan', 'Philippines',
        'Singapore', 'South Korea', 'Sri Lanka', 'Taiwan', 'Thailand',
        'Uzbekistan', 'Vietnam', 'Other'

    var europeArray = new Array(
        'Albania', 'Austria', 'Belarus', 'Belgium', 'Bosnia', 'Bulgaria',
        'Croatia', 'Cyprus', 'Czech Rep.', 'Denmark', 'Estonia', 'Finland',
        'France', 'Germany', 'Greece', 'Hungary', 'Iceland', 'Ireland',
        'Italy', 'Latvia', 'Liechtenstein', 'Lithuania', 'Luxembourg',
        'Macedonia', 'Malta', 'Monaco', 'Netherlands', 'Norway', 'Poland',
        'Portugal', 'Romania', 'Russia', 'Slovakia', 'Slovenia', 'Spain',
        'Sweden', 'Switzerland', 'Ukraine', 'United Kingdom', 'Other'

    var australiaArray = new Array('Australia', 'New Zealand', 'Other');

    var lamericaArray = new Array(
        'Costa Rica', 'Cuba', 'El Salvador', 'Guatemala', 'Haiti', 'Jamaica',
        'Mexico', 'Panama', 'Other'

    var namericaArray =  new Array('Canada', 'USA', 'Other');

    var samericaArray =  new Array(
        'Argentina', 'Bolivia', 'Brazil', 'Chile', 'Colombia', 'Ecuador',
        'Paraguay', 'Peru', 'Suriname', 'Uruguay', 'Venezuela', 'Other'

    if (element.value == 'none') {
        // drop countries
        while (country.options.length > 0)
            country.options[country.options.length-1] = null;
    } else {
        // get the matching array
        var selectedArray = eval(element.value+'Array');

        // drop supernumerous option
        while (selectedArray.length < country.options.length-1)
            country.options[country.options.length-1] = null;

        // add the new options
        country.options[0] = new Option('Select Country', 'none', true, true);
        for (var i=0; i < selectedArray.length; i++)
            country.options[i+1] =
                new Option(selectedArray[i], selectedArray[i]);
    } // if

    // drop states
    while (state.options.length > 0)
        state.options[state.options.length-1] = null;
} // ff_CselRegion_action

Ich verstehe nur nicht warum wen man schon eine Antwort gibt, nicht alle Karten auf den Tisch legt. ;-) Es ist auch so schon schwer, den Leidfaden der Coder zu folgen.
  • Posts: 1
  • Thank you received: 0

digamcrown replied the topic: Re: Variable Auswahlfelder erstellen ??


endlich habe ich scheinbar das gefunden, wonach ich seit langem Suche.

Ich möchte folgendes realisieren:

Es gibt eine Auswahlliste "Betreff" - diese ist gefüllt mit den Einträgen: "bitte wählen", "Booking", "sonstiges"

wählt man jetzt Booking, sollen zwei weitere Auswahllisten und ein Eingabefeld erscheinen.

1. Auswahlliste: "Art der Veranstaltung" - Felder: "Privat" und "Öffentlich"
2. Auswahlliste: "Equipment vorhanden?" - Felder: "ja" und "nein"
3. Eingabefeld: "Ort des Events"

wählt man jedoch "sonstiges", so soll nur ein Eingabefeld "Sonstiges" gezeigt werden.

Ist dies machbar? Ich habe schon etwas mit den beschriebenen Listen gebastelt, aber nichts geht.

Wer könnte mir bitte dabei behilflich sein?

Vielen Dank schon einmal,

Moderators: ForumSupporttomeperica
Time to create page: 0.063 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

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

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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 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 to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here