Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6811143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:17:28+00:00 2026-05-26T20:17:28+00:00

http://windowsnaarlinux.nl/#distrokiezer — Temporarily replaced the page with a PHP version, here’s the javascript version:

  • 0

http://windowsnaarlinux.nl/#distrokiezer — Temporarily replaced the page with a PHP version, here’s the javascript version: http://windowsnaarlinux.nl/pages/distrokiezer.html


Whenever you leave one of the first two fields empty and click the submit button (captioned Bevestigen), you get a warning and the script ends, as it’s supposed to do. But when you fill in the first two fields, and then click the submit, nothing what so ever happens. There doesn’t pop up any alert, as it should. Neither does there appear any kind of error or warning in Chrome’s javascript console.

The original page (the one of wich jQuery loads the content into div.window#content) is located here: http://windowsnaarlinux.nl/pages/distrokiezer.html
Might be worth mentioning that it worked fine before, and that I honestly don’t have a clue myself what I did to break it.


… I just noticed I forgot the part where it outputs the result to the user when I rewrote the script >.<

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:17:29+00:00Added an answer on May 26, 2026 at 8:17 pm

    The problem is that the warnings only appear when a field is left empty, because the first two fields are text input when left empty there value is nothing like your code checks for:

    if ((stop == false) && (document.getElementById('q1a').value == ''))
    

    However when your select boxes aren’t modified their default value is the value of the first option causing the javascript not to trigger.

    Put something like this as the first option in all your select forms:

    <option value="" selected="selected">Please select an option</option>
    

    This ensures that the default value is nothing. Just be sure to stop people (like you are already) using that option as it most likely means nothing.

    Further to my comment this is why currently no alert is being recieved when two checkboxes are being filled.

    Is the entire script….

        var distros = new Array('ubuntu', 'ubuntu-lts', 'mint', 'mintdebian', 'mintlxde', 'mintdebianxfce', 'elementary', 'debian-stable', 'debian-unstable', 'debian-testing', 'fedora', 'fedorakde', 'fedoralxde', 'fedoraxfce', 'centos', 'archlinux', 'puppylinux', 'lucidpuppy', 'crunchbang', 'dsl', 'tinycore', 'pinguyos', /*'gentoo',*/ 'mandriva', 'mageia', 'lubuntu', 'xubuntu', 'kubuntu', 'chakra', 'slackware', 'zorin', 'bodhi', 'vector', 'antix', 'opensuse');
    
        function zoekDistro()
        {
            try
            {
                var stop = false;
    
                //q1a
                var q1a = parseInt(document.getElementById('q1a').value);
                if ((stop == false) && (document.getElementById('q1a').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 1a!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q1a < 1600)
                    {
                        dumpDistro('pinguyos');
                        dumpDistro('mintkde');
                        dumpDistro('kubuntu');
                    }
                    if (q1a < 1400)
                    {
                        dumpDistro('mint');
                        dumpDistro('fedorakde');
                        dumpDistro('fedora');
                        dumpDistro('pinguyos');
                        dumpDistro('chakra');
                        dumpDistro('ubuntu');
                        dumpDistro('mandriva');
                        dumpDistro('opensuse');
                    }
                    if (q1a < 1200)
                    {
                        dumpDistro('ubuntu-lts');
                    }
                    if (q1a < 1000)
                    {
                        dumpDistro('mintdebian');
                        dumpDistro('debian-stable');
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('mageia');
                        dumpDistro('xubuntu');
                        dumpDistro('crunchbang');
                    }
                    if (q1a < 800)
                    {
                        dumpDistro('mintlxde');
                        dumpDistro('mintdebianxfce');
                        dumpDistro('elementary');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('centos');
                        dumpDistro('archbang');
                        dumpDistro('zorin');
                    }
                    if (q1a < 600)
                    {
                        dumpDistro('lubuntu');
                        dumpDistro('slackware');
                        dumpDistro('archlinux');
                    }
                    if (q1a < 400)
                    {
                        dumpDistro('vector');
                        dumpDistro('gentoo');
                    }
                    if (q1a < 300)
                    {
                        dumpDistro('antix');
                        dumpDistro('lucidpuppy');
                        dumpDistro('bodhi');
                    }
                    if (q1a < 200)
                    {
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                    }
                    if (q1a < 100)
                    {
                        dumpDistro('tinycore');
                    }
                }
                //q2a
                var q1b = parseInt(document.getElementById('q1b').value);
                if ((stop == false) && (document.getElementById('q1b').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 1b!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q1b < 2000)
                    {
                        dumpDistro('pinguyos');
                    }
                    if (q1b < 1600)
                    {
                        dumpDistro('kubuntu');
                        dumpDistro('ubuntu');
                    }
                    if (q1b < 1400)
                    {
                        dumpDistro('fedora');
                        dumpDistro('fedorakde');
                    }
                    if (q1b < 1000)
                    {
                        dumpDistro('ubuntu-lts');
                        dumpDistro('mint');
                        dumpDistro('debian-unstable');
                        dumpDistro('mandriva');
                        dumpDistro('mageia');
                        dumpDistro('xubuntu');
                        dumpDistro('chakra');
                        dumpDistro('opensuse');
                    }
                    if (q1b < 800)
                    {
                        dumpDistro('mintlxde');
                        dumpDistro('lubuntu');
                    }
                    if (q1b < 700)
                    {
                        dumpDistro('elementary');
                    }
                    if (q1b < 512)
                    {
                        dumpDistro('mintdebian');
                        dumpDistro('debian-testing');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('crunchbang');
                    }
                    if (q1b < 400)
                    {
                        dumpDistro('mintdebianxfce');
                        dumpDistro('debian-stable');
                        dumpDistro('archbang');
                        dumpDistro('archlinux');
                        dumpDistro('centos');
                        dumpDistro('zorin');
                        dumpDistro('vector');
                    }
                    if (q1b < 256)
                    {
                        dumpDistro('gentoo');
                        dumpDistro('slackware');
                    }
                    if (q1b < 128)
                    {
                        dumpDistro('bodhi');
                        dumpDistro('puppylinux');
                    }
                    if (q1b < 64)
                    {
                        dumpDistro('lucidpuppy');
                        dumpDistro('antix');
                    }
                    if (q1b < 48)
                    {
                        dumpDistro('tinycore');
                    }
                }
                //q2a
                var q2a = document.getElementById('q2a').value;
                if ((stop == false) && (q2a == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 2a!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q2a === 'nee')
                    {
                        dumpDistro('debian-stable');
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                        dumpDistro('tinycore');
                        dumpDistro('gentoo');
                        dumpDistro('chakra');
                        dumpDistro('slackware');
                        dumpDistro('vector');
                        dumpDistro('mandriva');
                        dumpDistro('archbang');
                        dumpDistro('antix');
                    }
                }
                //q2b
                var q2b = document.getElementById('q2b').value;
                if ((stop == false) && (q2b == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 2b!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q2b === 'ja')
                    {
                        dumpDistro('debian-unstable');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('archbang');
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                        dumpDistro('tinycore');
                        dumpDistro('gentoo');
                        dumpDistro('vector');
                    }
                }
                //q2c
                var q2c = parseInt(document.getElementById('q2c').value);
                if ((stop == false) && (document.getElementById('q2c').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 2c!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q2c < 8)
                    {
                        dumpDistro('gentoo');
                        dumpDistro('archlinux');
                    }
                    if (q2c < 7)
                    {
                        dumpDistro('tinycore');
                    }
                    if (q2c < 6)
                    {
                        dumpDistro('debian-unstable');
                        dumpDistro('centos');
                        dumpDistro('archbang');
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                        dumpDistro('chakra');
                        dumpDistro('slackware');
                        dumpDistro('vector');
                        dumpDistro('antix');
                        dumpDistro('mandriva');
                    }
                    if (q2c < 5)
                    {
                        dumpDistro('debian-testing');
                    }
                    if (q2c < 4)
                    {
                        dumpDistro('crunchbang');
                    }
                    if (q2c < 3)
                    {
                        dumpDistro('mintdebian');
                        dumpDistro('mintdebianxfce');
                        dumpDistro('debian-stable');
                        dumpDistro('fedora');
                        dumpDistro('fedorakde');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('mandriva');
                    }
                }
                //q3a
                var q3a = parseInt(document.getElementById('q3a').value);
                if ((stop == false) && (document.getElementById('q3a').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 3a!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q3a == 4)
                    {
                        dumpDistro('ubuntu');
                        dumpDistro('ubuntu-lts');
                        dumpDistro('elementary');
                        dumpDistro('fedorakde');
                        dumpDistro('opensuse');
                        dumpDistro('mageia');
                        dumpDistro('mint');
                        dumpDistro('mintlxde');
                        dumpDistro('lubuntu');
                        dumpDistro('kubuntu');
                        dumpDistro('xubuntu');
                    }
                    if (q3a == 3)
                    {
                        dumpDistro('elementary');
                    }
                    else if (q3a == 1)
                    {
                        dumpDistro('debian-unstable');
                        dumpDistro('debian-testing');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                        dumpDistro('gentoo');
                        dumpDistro('mandriva');
                        dumpDistro('vector');
                        dumpDistro('antix');                
                    }
                }
                //q3b
                var q3b = document.getElementById('q3b').value;
                if ((stop == false) && (q3b == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 3b!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q3b == 'ja')
                    {
                        dumpDistro('ubuntu');
                        dumpDistro('ubuntu-lts');
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('debian-stable');
                        dumpDistro('elementary');
                        dumpDistro('fedora');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('crunchbang');
                        dumpDistro('archbang');
                        dumpDistro('pinguyos');
                        dumpDistro('gentoo');
                        dumpDistro('mandriva');
                        dumpDistro('xubuntu');
                    }
                    if (q3b == 'neevoorwaarde')
                    {
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('debian-stable');
                        dumpDistro('fedora');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('pinguyos');
                        dumpDistro('gentoo');
                        dumpDistro('mandriva');
                        dumpDistro('xubuntu');
                    }
                    if (q3b == 'neemacos')
                    {
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('debian-stable');
                        dumpDistro('fedora');
                        dumpDistro('fedoralxde');
                        dumpDistro('fedoraxfce');
                        dumpDistro('centos');
                        dumpDistro('archlinux');
                        dumpDistro('crunchbang');
                        dumpDistro('archbang');
                        dumpDistro('gentoo');
                        dumpDistro('mandriva');
                        dumpDistro('mageia');
                        dumpDistro('xubuntu');
                        dumpDistro('mint');
                        dumpDistro('mintdebian');
                        dumpDistro('mintlxde');
                        dumpDistro('mintdebianxfce');
                        dumpDistro('fedorakde');
                        dumpDistro('puppylinux');
                        dumpDistro('lucidpuppy');
                        dumpDistro('dsl');
                        dumpDistro('lubuntu');
                        dumpDistro('kubuntu');
                        dumpDistro('chakra');
                        dumpDistro('slackware');
                        dumpDistro('zorin');
                        dumpDistro('vector');
                        dumpDistro('antix');
                        dumpDistro('opensuse');
                    }
                }
                //q3c
                var q3c = document.getElementById('q3c').value;
                if ((stop == false) && (q3c == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 3c!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q3c == 'ja')
                    {
                        dumpDistro('debian-stable');
                        dumpDistro('debian-testing');
                        dumpDistro('debian-unstable');
                        dumpDistro('centos');
                        dumpDistro('gentoo');
                    }
                }
                //q3d
                var q3d = document.getElementById('q3d').value;
                if ((stop == false) && (q3d == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 3d!');
                    stop = true;
                }
                if (stop == false)
                {
                    if (q3d == 'stabiel')
                    {
                        dumpDistro('ubuntu');
                        dumpDistro('mintdebian');
                        dumpDistro('mintdebianxfce');
                        dumpDistro('debian-unstable');
                        dumpDistro('debian-testing');
                        dumpDistro('fedora');
                        dumpDistro('puppylinux');
                        dumpDistro('dsl');
                        dumpDistro('pinguyos');
                        dumpDistro('mandriva');
                        dumpDistro('kubuntu');
                        dumpDistro('chakra');
                        dumpDistro('slackware');
                        dumpDistro('opensuse');
                    }
                    else if (q3d == 'test')
                    {
                        dumpDistro('debian-stable');
                        dumpDistro('debian-unstable');
                    }
                    else if (q3d == 'experimenteel')
                    {
                        dumpDistro('debian-stable');
                    }
                }
                if (distros.length > 6)
                {
                    if ((q1a > 1000) && (q1b > 1000))
                    {
                        dumpDistro('mintlxde');
                        dumpDistro('mintdebianxfce');
                        if (distros.length > 3) { dumpDistro('fedoralxde'); }
                        if (distros.length > 3) { dumpDistro('fedoraxfce'); }
                        if (distros.length > 3) { dumpDistro('mintdebianxfce'); }
                        if (distros.length > 3) { dumpDistro('lucidpuppy'); }
                        if (distros.length > 3) { dumpDistro('crunchbang'); }
                        if (distros.length > 3) { dumpDistro('dsl'); }
                        if (distros.length > 3) { dumpDistro('tinycore'); }
                        if (distros.length > 3) { dumpDistro('bodhi'); }
                        if (distros.length > 3) { dumpDistro('antix'); }
                        if (distros.length > 4)
                        {
                            if (q3b != 'ja')
                            {
                                dumpDistro('zorin');
                            }
                        }
                    }
                }
            }
            catch (error)
            {
                alert(error);
            }
        }
        function dumpDistro(distro)
        {
            for (var i = 0; i < distros.length; i++ )
            { 
                if (distros[i] == distro)
                {
                    distros.splice(i,1); 
                }
            } 
        }
    </script>
    

    var stop = false; so let’s remember that.

    if ((stop == false) && (document.getElementById('q1a').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 1a!');
                    stop = true;
                }
    

    Doesn’t fire when input has content.

    if ((stop == false) && (document.getElementById('q1b').value == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 1b!');
                    stop = true;
                }
    

    Doesn’t fire when input has content.

      if ((stop == false) && (q2a == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 2a!');
                    stop = true;
                }
    

    Doesn’t fire when input has content.

     if ((stop == false) && (q2b == ''))
                {
                    alert('Geen antwoord opgegeven bij vraag 2b!');
                    stop = true;
                }
    

    Doesn’t fire when input has content … and so on…

    Can you post the specific alert you think should fire even when no values are empty?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://developer.yahoo.com/javascript/howto-proxy.html Are there disadvantages to this technique? The advantage is obvious, that you can
http://biochrom.fivesite.co.uk/catalogue4.asp On the page above there is an image floated to the left. To
http://leepoint.net/notes-java/data/expressions/22compareobjects.html It turns out that defining equals() isn't trivial; in fact it's moderately hard
http://developer.android.com/guide/topics/manifest/service-element.html#proc What are the differences? If the name assigned to this attribute begins with
http://www.boost.org/doc/libs/1_35_0/doc/html/boost/get_id405862.html template<typename U, typename T1, typename T2, ..., typename TN> U & get(variant<T1, T2,
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html According to that article STL isn't suited for game-development. What are your thoughts
http:// domain.com/index.php -> http:// domain.com/ - OK http:// domain.com/index.php?z=abc -> http:// domain.com/index.php?z=abc - not
http://jvalentino2.tripod.com/dft/index.html My code is really just a copy of the above: package it.vigtig.realtime.fourier; import
http://farm3.anhso.net/upload/20110221/12/o/anhso-121531_example.jpg Here is the examples, when you drag A or B , the size
http://www.dreamincode.net/forums/xml.php?showuser=335389 I'd like to save that XML response to a string variable in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.