[Solved] Cannot read property of ‘…’ undefined [closed]

In console.log(convertToHex()) your are not passing any parameter to convertToHex, and that function expects a parameter: function convertToHex(str) // ^^^ Now when you call that function like you did without passing an argument, str inside the function will be undefined. And thus, here: for(var i=0; i < str.length; i++) // ^^^^ undefined has no length. … Read more

[Solved] How can I make a two page search filter function using JavaScript? [closed]

By passing the data from Page1.html through get method and retrieve it on Page2.html, you can do like following Page1.html <!DOCTYPE html> <html> <body> <form action=”Page2.html” method=”get”> <select name=”color” > <option>Blue</option> <option>Red</option> </select> <br><br> <select name=”shape” > <option>Square</option> <option>Circle</option> </select> <br><br> <input type=”submit” /> </form> </body> </html> Page2.html <!DOCTYPE html> <html> <body> <style> .RedSquare{width:200px;height:200px;background:red;} .BlueSquare{width:200px;height:200px;background:blue;} … Read more

[Solved] How to use Meteor [closed]

I just recently learnt meteor and I found these courses really helpful. https://www.coursera.org/learn/meteor-development https://www.coursera.org/learn/web-application-development They show you how to get up and running and where to find all the info you’re looking for. 1 solved How to use Meteor [closed]

[Solved] Break the string and arrange it in highest order

You can split the String on “” and map it to convert each item to a number. Then you can use Array.prototype.sort to put it in descending order. If you want it as a String you can join it on “”. var str = “92345”; var numStr = str.split(”).map(function(item) { return +item; }); var orderedArr … Read more

[Solved] Sort an array of arrays by key

This in invalid syntax, you are mixing array and object syntax: [ ‘0.00000979’: 1730, ‘0.00000969’: 206, ‘0.00000955’: 3141, ‘0.00000951’: 525, ‘0.00000941’: 159, ‘0.0000095’: 1000, ] To be able to sort, you need a valid array, actually an array of arrays: var data = [ [0.00000979, 1730], [0.00000969, 206], [0.00000955, 3141], [0.00000951, 525], [0.00000941, 159], [0.0000095, … Read more

[Solved] How do I write a hover code? [closed]

why not use CSS (3 if you want animation)? #login{ position: absolute; top: 42px; left: 1202px; width: 63px; height: 19px; background-color: #2799b6; text-align: center; font-family: corbel; border-radius:20px; color:#FFF; font-size:15px; opacity:1; -moz-transition: opacity .5s; -o-transition: opacity .5s; -webkit-transition: opacity .5s; transition: opacity .5s; } #login:hover{ opacity:0; -moz-transition: opacity .5s; -o-transition: opacity .5s; -webkit-transition: opacity .5s; transition: … Read more

[Solved] Double Consonants on String

Here is a simple example: var consonants = [ ‘b’, ‘c’, ‘d’, ‘f’, ‘g’, ‘h’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘v’, ‘w’, ‘x’, ‘z’ ]; var translate = function(str) { var result=””; for (var i = 0; i < str.length; i++) { if (cosonants.indexOf(str[i]) === -1) { result += str[i]; … Read more

[Solved] how do I translate this javascript code

For those playing at home: double-encoded. ckcxo49=[‘%61%6e%69%73%70’,[‘%63%6f%6d’,’%69%63%6c%6f%75%64′].reverse().join(‘.’)].join(‘@’);kcjxq43=’Anis Panjwani’;document.write(kcjxq43.link(‘mai’+’lto:’+ckcxo49)); Unreversed: anisp com icloud Come on: it’s just url-encoded. Show some initiative. 3 solved how do I translate this javascript code

[Solved] Java Script/Jquery – If numbers beteen then show [closed]

I made some assumptions here (like you meant 1001-2000). Is this what you need? $(‘#unidno’).keyup(function () { if (parseInt($(this).val()) >= 0 && parseInt($(this).val()) <= 1000) { $(‘#spanResult’).text(‘10.10.2013’); } else if (parseInt($(this).val()) > 1000 && parseInt($(this).val()) <= 2000) { $(‘#spanResult’).text(‘20.12.2013’); } else { $(‘#spanResult’).text(”); } }); 6 solved Java Script/Jquery – If numbers beteen then show … Read more

[Solved] Can Windows Script Host run a .js file [closed]

Presumably, the goal is to edit the JavaScript file. Open your prefered editor. e.g. Visual Studio Code, Sublime Text, Atom or Brackets. Pick “Open” from the “File” menu Pick your JS file from the dialog At some point you may wish to configure your file manager (e.g. Windows Explorer or macOS Finder) to open JS … Read more

[Solved] “callback is not defined” in node js

You don’t need a callback in this case, because you’re at the end of your route, so to speak. So instead, you could do something like handle it with sending an error message to your rendered page. var express = require(‘express’); var router = express.Router(); var mysql_db = require(‘../db/db_con’)(); var pool = mysql_db.init(); /* GET … Read more

[Solved] when I pressed the login button without entering username & password, browser’s top left corner display message like this “Invalid Info” [closed]

Not sure what you want to do tho but maybe display a simple alert ? function showAlert(){ $( “#dialog” ).dialog({modal: true}); } <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css”> <script src=”https://code.jquery.com/jquery-1.12.4.js”></script> <script src=”https://code.jquery.com/ui/1.12.1/jquery-ui.js”></script> <body> <input type=”button” value=”ClickMe” onClick=’showAlert()’> <div id=”dialog” title=”” style=”display: none;”> <p>Alert box. wrong username password!.</p> </div> </body> 3 solved when I pressed the login button without … Read more