[Solved] If function in drop down list using JavaScript [closed]

function myFunction() { var internetElem = document.getElementById(“internet”); var internet = internetElem.options[internetElem.selectedIndex].value; var computerElem = document.getElementById(“computer”); var computer= internetElem.options[internetElem.selectedIndex].value; if (internet==”no”||computer==”yes”) { x=”check your cable is not cut or loose”; } else if (internet==”no”||computer==”yes”) { x=”connection problem”; } else { x=”other problems….”; } document.getElementById(“Solution”).innerHTML=x; } You need something like above. Just find an element by its … Read more

[Solved] How do I store the data which is passed though the browser link in a mySQL database? [closed]

you are actually looking for _GET[‘message3’]variable.. do something like that $message = _GET[‘message3’] ; if(isset($message){ $sql = insert your $message variable in database here run the query } etc.. and you are done I assume that you are learning over your localhost and you got the file Sent.jsp solved How do I store the data … Read more

[Solved] browser only downloads 10 images at once (JS) [closed]

I’m not sure what you are trying to do, but if there is a restriction on the number of simultaneous downloads, why not try setting a timeout so they don’t fire at the same time? transferFiles(){ this.checkMark = true let i = 0 this.finalImages.forEach((image) =>{ setTimeout(function(){ saveAs(image, ‘imagem’+(i+1)); }, i++ * 500); }); } 3 … Read more

[Solved] How to use bootstrap 4 alerts?

this is a 2 part solution. First you would need HTML markup that represent the alert (and the trigger button) <button id=”btnShowAlert” type=”button”>Click Me!</button> <div id=”myAlert” style=”display: none;” class=”alert alert-primary” role=”alert”> my alternative message </div> Then secondly you would need the JavaScript (jQuery) that listens for click events on the button, then show the alert … Read more

[Solved] pop up window does not open when code added in java script

As pointed out, the problem was that the event handler was listening for any kind of click event in the window object. Instead I refactored the code and put the respective buttons in variables and added the addEventListener. // contact-form opens upon clicking the “get a quote” Button let quoteButton = document.getElementById(‘quote-button’); quoteButton.addEventListener(‘click’, function() { … Read more

[Solved] How to add randomness to the blink effect? [closed]

This is as good as my answer can get until the question gets more specific: (function blink() { $(‘.demo’).fadeOut(Math.random()*500).fadeIn(Math.random()*400, blink); })(); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”></script> <span class=”demo”>I’m blinking!</span> 4 solved How to add randomness to the blink effect? [closed]

[Solved] Adding Item to list on click Javascript/Jquery

Hi this is how can you retrive data using jquery $(document).ready(function () { $.ajax({ type: “POST”, contentType: “application/json; charset=utf-8”, url: “URL/MethodName”, data: “{}”,// you can provide parameteres to your function here dataType: “JSOn”, success: function (data) { for (var i in data) { alert(data[i].Id); //assign to controls alert(data[i].Header);// assign to controls alert( data[i].Content) ;// assign … Read more

[Solved] Image Display on Hover

Your jsFiddle was messed up, that’s all. You shouldn’t put the <style></style> tags in the CSS area, and you shouldn’t put the <script></script> tags in the JavaScript area. Also, to include jQuery, you need to include it as an external resource, which is a section in the left sidebar. You put your resource URL in … Read more

[Solved] how to get the time when exiting a textfield? [closed]

On keyup, store the current time in a hidden input. http://jsfiddle.net/trevordixon/hL8YB/ <input type=”text” name=”name” id=”name_input”> <input type=”hidden” name=”name_time” id=”name_time_input” size=”100″> <script> $(‘#name_input’).keyup(function() { var now = new Date(); $(‘#name_time_input’).val(now.toString()); }); </script> 1 solved how to get the time when exiting a textfield? [closed]