Trending questions in Java-Script

0 votes
1 answer

How to get the browser to navigate to URL in JavaScript?

Hii, This works in all browsers: window.location.href = '...'; If ...READ MORE

May 28, 2020 in Java-Script by Niroj
• 82,880 points
2,399 views
0 votes
1 answer

How can I get the user's local time instead of the server's time?

Hello @kartik, For client side, you would need ...READ MORE

Jul 7, 2020 in Java-Script by Niroj
• 82,880 points
459 views
0 votes
1 answer

How do I pass command line arguments to a Node.js program?

Hello @kartik, If your script is called myScript.js ...READ MORE

May 5, 2020 in Java-Script by Niroj
• 82,880 points
2,940 views
0 votes
1 answer

How to call jQuery UI Dialog with ASP.NET button postback?

Hello @kartik, To solve the problem with ASP:Button ...READ MORE

Apr 28, 2020 in Java-Script by Niroj
• 82,880 points
3,147 views
0 votes
1 answer

Error: Use of const in strict mode

Hello, If this is happening in nodejs, it ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
3,309 views
+1 vote
1 answer

How to Check synchronously if file/directory exists in Node.js?

Hello, You can use fs.existsSync(): const fs = require("fs"); // ...READ MORE

May 28, 2020 in Java-Script by Niroj
• 82,880 points
1,636 views
0 votes
1 answer

How do I get PHP errors to display?

Hello @kartik, To display all errors you need ...READ MORE

Jun 20, 2020 in Java-Script by Niroj
• 82,880 points
686 views
0 votes
1 answer

How do you access the matched groups in a JavaScript regular expression?

Hello, Here’s a method you can use to ...READ MORE

May 28, 2020 in Java-Script by Niroj
• 82,880 points
1,640 views
0 votes
1 answer

How do I return the response from an asynchronous call?

Hello @kartik, You are using Ajax incorrectly. The ...READ MORE

Jun 17, 2020 in Java-Script by Niroj
• 82,880 points
740 views
0 votes
1 answer

How do I remove a property from a JavaScript object?

Objects in JavaScript can be thought of ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,880 points
1,134 views
0 votes
1 answer

How to do API call in react js?

Hello, Use fetch method inside componentDidMount to update state: componentDidMount(){ fetch('https://dey.me/api/') ...READ MORE

May 18, 2020 in Java-Script by Niroj
• 82,880 points
1,948 views
0 votes
1 answer

Error:Callback of .animate() gets called twice jquery

Hiii @kartik, To get a single callback for ...READ MORE

Jun 2, 2020 in Java-Script by Niroj
• 82,880 points
1,255 views
0 votes
1 answer

How do I select an element with its name attribute in jQuery?

Hello @kartik, You can use: jQuery('[name="' + nameAttributeValue + ...READ MORE

Jun 11, 2020 in Java-Script by Niroj
• 82,880 points
854 views
0 votes
1 answer

How do I cancel an HTTP fetch() request?

Hello @kartik, If you have an in-flight response ...READ MORE

Jun 18, 2020 in Java-Script by Niroj
• 82,880 points
505 views
0 votes
1 answer

How to list the properties of a JavaScript object?

Hii @kartik, Use Reflect.ownKeys(): var obj = {a: 1, b: ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,880 points
820 views
0 votes
1 answer

How to customize the auth.User Admin page in Django CRUD?

Hello @kartik, Try this in admin.py file : from ...READ MORE

Jun 12, 2020 in Java-Script by Niroj
• 82,880 points
637 views
0 votes
1 answer

Error:$(document).ready equivalent without jQuery

Hello @kartik, Extends DOMContentLoaded so that it can ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,880 points
748 views
0 votes
1 answer

How do I check if an element is hidden in jQuery?

Hello @kartik,  You can use CSS: class .hide { ...READ MORE

Jun 8, 2020 in Java-Script by Niroj
• 82,880 points
712 views
+1 vote
1 answer

How to implement up and down voting of a particular thread?

Hello @kartik, Yes, JavaScript is involved. There are ...READ MORE

Jun 3, 2020 in Java-Script by Niroj
• 82,880 points
906 views
0 votes
1 answer

From php returning JSON to JavaScript

Hii @kartik, You can use Simple JSON for PHP. ...READ MORE

Jun 5, 2020 in Java-Script by Niroj
• 82,880 points
769 views
0 votes
1 answer

Error:“Access is denied” error on accessing iframe document object

Hello @kartik, Basically, this error occurs when the ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
2,343 views
0 votes
1 answer

How to implement useEffect() so the list on the front page updates only when a name change has been detected?

Hello @kartik, Instead of passing the entire object ...READ MORE

Jun 1, 2020 in Java-Script by Niroj
• 82,880 points
753 views
0 votes
1 answer

Switch statement for string matching in JavaScript

Hello @kartik, Just use the location.host property switch (location.host) ...READ MORE

Jun 2, 2020 in Java-Script by Niroj
• 82,880 points
630 views
0 votes
1 answer

How to access GET directly from JavaScript?

Hello @kartik, You can first go through: window.location.search It will ...READ MORE

Apr 29, 2020 in Java-Script by Niroj
• 82,880 points
2,034 views
0 votes
1 answer

How to print a circular structure in a JSON-like format?

Hello, You can use util.inspect(object) in node.js. It automatically ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
2,217 views
+1 vote
1 answer

Error:SQL “between” not inclusive

Hello, It is inclusive. You are comparing datetimes to dates. ...READ MORE

May 28, 2020 in Java-Script by Niroj
• 82,880 points
548 views
0 votes
1 answer

How to set outerHTML with jQuery?

hello @kartik, This is innterHTML because it's inside ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
1,889 views
0 votes
1 answer

How to get the directory of the currently running file?

Hello @kartik, This should do it: import ( ...READ MORE

May 6, 2020 in Java-Script by Niroj
• 82,880 points
1,194 views
0 votes
1 answer

How can I update NodeJS and NPM to the next versions?

Hello @kartik, First check your NPM version npm -v 1).Update ...READ MORE

May 5, 2020 in Java-Script by Niroj
• 82,880 points
787 views
0 votes
1 answer

How can we change the page URL without refreshing the page?

Hello @kartik,  In HTML5 you can change the ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
1,127 views
0 votes
1 answer

Error: listen EADDRINUSE while using nodejs?

Hello kartik, Two possible solutions for this: Free currently ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
1,075 views
0 votes
1 answer

How do I turn a string to a json in Node.js?

Hello Kartik, Use the JSON function  JSON.parse(theString) ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
792 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'setState' of undefined

Hello kartik, You dont have to bind anything, ...READ MORE

Apr 27, 2020 in Java-Script by Niroj
• 82,880 points
646 views
0 votes
1 answer

What is the difference between node.js and io.js?

Hello, io.js: Node-forward is basically being merged into io.js forked on ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
647 views
0 votes
1 answer

How can we parse JSON using Node.js?

Hello @kartik, You can simply use JSON.parse. The definition of ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
640 views
0 votes
1 answer

How can we create an HTTPS server in Node.js?

Hii, The Express API doc spells this out pretty clearly. I ...READ MORE

Apr 24, 2020 in Java-Script by Niroj
• 82,880 points
549 views
0 votes
1 answer

How to Scroll to the top of the page using JavaScript?

Hii @kartik, Using javascript <script> $("a[href='#top']").click(function() { ...READ MORE

Apr 2, 2020 in Java-Script by Niroj
• 82,880 points
784 views
0 votes
1 answer

How to clone a JavaScript object?

Hello, You can clone an object and remove ...READ MORE

Apr 2, 2020 in Java-Script by Niroj
• 82,880 points
676 views
0 votes
1 answer

What are XMLHttpRequest Object in Ajax?

 As, you are up to ajax so ...READ MORE

Jan 31, 2020 in Java-Script by Niroj
• 82,880 points
1,163 views