Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About roberto68

  • Rank
  • Birthday 10/24/1990
  1. so I changed $("#dropdowns").change(function() { for (every DD has that class) $(".dropdown-menu").change(function() { so it targets every DD but the buttons stays disabled all the time. And my last point - why are the dropdowns rolled out on page load - I want them to be hidden and show only on the click - which it does right now but on the page load it is "rolled out" not hidden as I excpect it to be right now it is like that // $("select").removeClass("dropdown-menu"); $('.dropdown-toggle').click(function(){ $('.dropdown-menu').toggle(); }); when I uncoment the 1st line
  2. and here's html : just hte 1st dropwdown but it goes on like that <form name="dropdowns" id="dropdowns"> <div class="box"> <img src="images/pic1.jpg" alt="pic1"> <h2>education</h2> <label for='educationForm'>select what you wanna learn<br><div align="center" class="drop"> <a href="#" class="dropdown-toggle">select</a><select class="dropdown-menu" multiple="multiple" name="mydropdown1[]" id="dd1"><label="education"><option value="1">IT-programing</option><option value="2"&g
  3. I've form where htere are 4 multiselect dropdowns I use code like this ("dropdowns" is the id of that form) and there's nothing else in that form just those multiselects. $(".submit").attr('disabled','disabled'); // defaultne disabled $("#dropdowns").change(function() { // alebo cekovat kazdy dd zvlast if($(this).val()===""){ $(".submit").removeAttr('disabled'); } else { $(".submit").attr('disabled','disabled'); } }); maybe should I chcek all 4 DDs inside the .change(function ??? instead of if =($this) for (i=1; i<4; i++) { if($("#dd"+i).val()===""){ ....
  4. I've 4 dropdowns (multiple select) - when value of any changes = user selects -> append that option to <ul>, if deselect => remove that option from <ul> that dropdowns are in 1 form so right now I've smth like this - I know it is not all OK $(".submit").attr('disabled','disabled'); // $("#dropdowns").change(function() { if($(this).val()===""){ $(".submit").removeAttr('disabled'); } else { $(".submit").attr('disabled','disabled'); }for (i=1; i<4; i++) { $('#"dd"+i option
  5. https://railsforum.com/topic/60691-could-not-locate-gemfile-or-bundle-directory-but-i-did-cd-my-project/
  6. but the probelm is with that from retrieving on another page - cause the form consist of 4 multiple select dropdowns. yeah but now i have an idea i retireve it like this var DD1 = <?php echo json_encode($_GET["mydropdown1"]) ?>; var DD2 = <?php echo json_encode($_GET["mydropdown2"]) ?>; .... and then I can concatenate those 4 fields into one, is it a good idea?
  7. ok so now I've corrected it - to explain it better : currently I've one multiselect Dropdown with devided by optgroup tags, but I've have template where there are 4 ( 3 are blank cause that's the problem how to post 4 dropdowns in 1 form) but that 1 Dropdown is working well right now - but I want 4 and optionaly show user what they've selected in some extra DD which'll be blank on document.ready
  8. I have 4 multuiple select elemts - Dropdown lists. When user selects an option I want that option appear in blank DD (or some textbox...) . If it's to complicated meaybe it'll be enough just to detect taht values selected in those dropdowns on button click. Here's my html <form name="dropdowns" id="dropdowns"><label for='educationForm'>select what you wanna learn<br><div align="center"><select multiple="multiple" name="mydropdown1[]" id="dd1"><option value="1">IT-programing</option><option value="2">IT-sys_admin</option><option value
  9. I've find this on Stackoverflow - and it works fine $('#submit').attr('disabled', true);$('.required').keyup(function () { var disable = false; $('.required').each(function(){ //type hidden exclude if($(this).val()==""){ //notifikovat ze nefunguje GPS - adresa disable = true; } }); // tato funckia check text filedy ci su filled $('#submit').prop('disabled', disable); });
  10. https://developers.google.com/maps/documentation/javascript/events#EventArguments and yeah I read the intro at the top of that page dbclick is valid event
  11. function Person (name, age) { this.name = name; this.age = age;this.printMe = new function(){ return console.log("name" + Person.name + "age" + Person.age); };}// Now we can make an array of peoplevar family = new Array();family[0] = new Person("alice", 40);family[1] = new Person("bob", 42);family[2] = new Person("michelle", 8);family[3] = new Person("timmy", 6);// add the last family member, "timmy", who is 6 years oldfor (i=0; i < family.length; i++){ family[i].printMe; } It's simple I wanna print name and age but this way it isn't working
  12. no I do not have any error, when I doubleclick it only zooms in, I put alert box right after placeMarker but no alert appears , ok so i change dbclick to click and it works
  13. my approach is simple want a prompt box apper on doubleclick on google maps : user clicks yes (some form is rendered, another page - for now alert box appears) if no nothing.. but my code doesn't do teh work google.maps.event.addListener(map, 'dbclick', function(event) {placeMarker(event.latLng,"addEvents.html"); }); function placeMarker(location, page) {// render pop up box, to add event or cancel if (confirm("Press a button!") == true) { alert ("You pressed OK!"); // render pop up form //window.location.replace(page); // podla toho ci event or place var marker =
  14. for everyone else here's the answer http://stackoverflow.com/questions/28408357/disable-form-button-unless-all-text-input-fields-are-filled-in
  15. I've form consisting of multiple fileds and I need to disable sumit button unless user fill smth in those fileds ( all of the requiered ones). I've smth like this $(document).ready(function() { $("#submit").attr('disabled', 'disabled'); $("#eventName").keyup(function(){ // treba prerobit if($(this).val() != '') { $("#myText").keyup(function(){ if($(this).val() != '') {if (document.getElementById("start").value() !=""){ // mozno tiez (function){ but this is not dong the work. wouldn't be smth like while(1) and chcek if every filed is filled ( .val() !='') -
  • Create New...