[Solved] How to check what tag says for a password

[ad_1] I have also wanted to make login page. 1) For the input I want to trigger an event function to check if password is right so I say <input type = “password” id = “passwordInput”></input> <button onclick = “myfunction()”>Submit</button> 2) Now that I have the onclick, I need to make my function function myfunction() … Read more

[Solved] on click, reduce countdown with 1 and so something, when countdown reaches 0 open window

[ad_1] This code is maybe the solution you wanted: function countdown() { var i = document.getElementById(‘counter’); if (parseInt(i.innerHTML)<=0) { $(“#counter”).fadeout(); i.innerHTML =10; i.style.width=”100%”; $(“#counter”).fadein(10); } else { i.innerHTML = parseInt(i.innerHTML)-1; setTimeout(function(){ var i = document.getElementById(‘counter’); i.style.width=”10%”; i.innerHTML=”1″; },5000) } var msg = window.open(“”, “Window name”, “width=200, height=100”); msg.document.write(“Some HTML”); } You have to add jquery … Read more

[Solved] How to select all cell starting, containing or ending with some word with JQuery/CSS?

[ad_1] you can use regular expressions. These two regexp checks if text contain “John” (anywhere) and ends with “1”: $(‘#myTable’).find(‘td’).each(function() { var str = $(this).text(); if (str.match(“John”) && str.match(“1$”) ) { $(this).css(‘background’, ‘red’); // …or do something else with it. } }); 3 [ad_2] solved How to select all cell starting, containing or ending with … Read more

[Solved] Java Script not working [closed]

[ad_1] Please don’t ask us to debug your websites / scripts without checking basic things by yourself. This is console output from Chrome (F12 or CTRL+SHIFT+i) Failed to load resource: the server responded with a status of 404 (Not Found) http://dev.eurodiet.ro/Scripts/jquery-1.4.2.min.js Failed to load resource: the server responded with a status of 404 (Not Found) … Read more

[Solved] Is it possible to update a textarea-element with data from an AJAX call? [closed]

[ad_1] You want a textarea to display the contents of logs.php, and update every 2 seconds. I think this should do it: <script> $(document).ready(function(e) { $.ajaxSetup({cache:false}); setInterval(function() { $.get(‘logs.php’, function(data) { $(‘#chatlogs’).text(data); }); }, 2000); }); </script> <textarea name=”” id=”chatlogs” style=”width:100px; height:100px”></textarea> Note you also need to add id=”chatlogs” to your textarea for this to … Read more

[Solved] How to popup an alert when every cell in a table has been clicked?

[ad_1] If you’re wanting to set each cell to have a red background individually on click it would be done like this and will alert after all 5 have been clicked. $(‘#one, #two, #three, #four, #five’).click( function() { $(this).toggleClass(“redbg”); if($(‘.redbg’).length == 5) alert(‘Bingo!’); }); .redbg { background: red; } <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> <table> <tr> <td id=”one”>1</td> … Read more

[Solved] Regex to allow only numbers and $ symbol [closed]

[ad_1] Try the below function function AllowNumbers(e, field) { var val = field.value; var re1 = /(^[0-9$]+)/g; val = re1.exec(val); if (val) { field.value = val[0]; } else { field.value = “”; } } and call this function on keyup of a textbox 2 [ad_2] solved Regex to allow only numbers and $ symbol [closed]

(Solved) Java permutation algorithm

[ad_1] Your question is of mathematics nature – combinations and permutations. You are actually asking the number of possible permutation for string length 7. The formula is factorial(numOfchar). In this case 7! = 7x6x5x4x3x2x1 = 5040. public static void main(String[] args) { String str = “ABCDEFH”; System.out.println(“Number of permutations for ” + str + ” … Read more