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 >.<
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:
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:
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 stop = false;so let’s remember that.Doesn’t fire when input has content.
Doesn’t fire when input has content.
Doesn’t fire when input has content.
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?