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,450 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
487 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,985 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,257 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,380 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,659 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
719 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,678 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,185 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
774 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,981 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,318 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
901 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
533 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
868 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
664 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
780 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
751 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
955 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
818 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,376 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
792 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
651 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,097 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,294 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,961 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
575 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,224 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,195 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
818 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,110 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
827 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
682 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
696 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
668 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
572 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
826 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
722 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,200 views