-
Posts
177 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by smus
-
? It continues sorting the column with numbers as if it's text, despite the conversion (text to number)
-
Hi, I need your hint. I am using table sort from this w3schools example: https://www.w3schools.com/howto/howto_js_sort_table.asp There is a table with 2 columns, the first contains text data, the second - numbers. I want the second one to be sorted as integers, but it doesn't work when I convert a string to number like this: if(n === 1){x = parseInt(x.innerHTML)} or number(x.innerHTML) n is the column id starting from zero
-
Add and average date from text input on different web pages
smus replied to theClerk's topic in JavaScript
justsomeguy is right, if you have complex data, better to store it in a database, server-side or client-side. Even HTML5 (using JS) has a way to store data called webstorage. Choose the way that suits you best -
Can you explain what you want?
- 2 replies
-
- input type
- html
-
(and 1 more)
Tagged with:
-
Input text type with onkeyup function and button function
smus replied to Alon's topic in JavaScript
<input type="text" onkeyup="thenameofthefunction()"> <input type="text" onclick="thenameofthefunction()"> -
HTML Web Workers are using JavaScript code to run. Why Web Workers need to be used only under a server then? I tried launching .html file separately and they don't work.
-
Yeah, true, same info is on StackOverflow: different implementatoins of recursive approach. Strange that ES6 doesn't have a built-in function or method for it. Object.hasOwnProperty is only for the upper-level keys which makes it useless for structured objects.
-
const data = { level1: { level2: { level3: 'some data' } } }; Is there a way to get the names of all the keys (at any level) in that object without using a recursion? (level1, level2, level3)
-
But it's fast! Have any of you tried AkelPad? I like it. It is simple, fast and if you need any of that options as highlighting, they are represented as plug-ins, so you can switch them on.
-
<button onclick="someFunction()">button</button> Have you added the quotes? The function starts on the page load?
-
I want to create full-functional web interface on node.js which uses mysql database. Node greatly interacts with MySQL (adding, editing data), but when it comes to returning the data from a database after submitting it, ordinary page reload is not enough. How am I better to perform it? Should I use some additional modules? I am pretty new to Node.js. So how is it usually done by node.js developers?
-
What is your JavaScript level?
-
Please help me with the complicated query that I should complete. Can't get the right result because 'having' has to have a static value to compare and 'where' doesn't work with aggregate functions. Is there an alternative way to solve it? Maybe inner join can help?
-
No other way? No kinda search method for big and complex objects?
-
Why is map() method often used for these reasons? Might that be because the structure is complex and I know the name of the property and I am not sure about its hierarchical disposition? For example, a = { first : ['propertyOne' = 'po', 'propertyTwo' = 'pt'], second : [smallObj = {s1:'s1', s2: 's2', s3: 's3'}, smallObj2 = {s1:'s1'}, ['a1', 'a2']], third : ['t1', [{'whatIWantToFind':'someInfo'}], t3, 'abcdef'] } I have to find the 'whatIWantToFind' property inside a object. I know it is inside the object, but I don't know where exactly it is. Do I need to use a map() or any other method for it?
-
If I have a JSON data, can I apply to it as if it is a JS Object, or I should use JSON.parse() first? Will it skip the property names quotes? ("name":"value" or name:"value") If there are some associative arrays inside and the structure is complex, is it easier to use array.map() method or it is better to apply to the properties directly?
-
It's a part of a more complex task. 5 is already a result, it is a GCD (greatest common divisor) of those 2 integers (210,65). They are function input parameters, but now it has to return x and y, not only GCD.
-
yes, it's needed to be solved by js
-
How do I solve the equation: 210x+65y=5 x and y must be integers
-
Where n is the amount of nested loops? According to your explanation, it is better to have several independent loops, than one nested loop: for(){} for(){} for(){} for(){} would be faster than: for(){ for(){} }