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

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

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 in … Read more

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

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 solved How to select all cell starting, containing or ending with some word … Read more

[Solved] Java Script not working [closed]

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) http://dev.eurodiet.ro/Scripts/swfobject_modified.js … Read more

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

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 work. … Read more

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

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> <td … Read more

(Solved) Java permutation algorithm

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 + ” is … Read more