questions/web-development/java-script
Hello @kartik, Use: var host = window.location.hostname; or possibly var host ...READ MORE
Hello @kartik, For current window, you can use this: var ...READ MORE
Hello @kartik, This is possible, but you'll have ...READ MORE
Hello @kartik, To disable document.getElementById("btnPlaceOrder").disabled = true; To enable document.getElementById("btnPlaceOrder").disabled ...READ MORE
Hello @kartik, You would iterate inside the object ...READ MORE
Hello @kartik, Set the name attribute of your form to "theForm" and ...READ MORE
Hello @kartik, Using the jQuery command getJSON and ...READ MORE
Hello @kartik, Try the onbeforeunload event: It is fired just ...READ MORE
Hello @kartik, This is how you link a ...READ MORE
Hello @kartik, Managed to get the input field ...READ MORE
Hello @kartik, "use strict"; Basically it enables the strict ...READ MORE
Hello @kartik, nodeName is the attribute you are looking ...READ MORE
Hello @kartik, Using Object.assign: Object.assign(yourelement.style,{fontsize:"12px",left:"200px",top:"100px"}); This also gives you ability to ...READ MORE
Hello @kartik, In your example, you can break ...READ MORE
Hello @kartik, Try this: function validate() { var ...READ MORE
Hello @kartik, To use params simply append them ...READ MORE
Hello @kartik, Use JSON.parse function isJson(str) { ...READ MORE
Hello @kartik, You can use a DOMParser, like so: var ...READ MORE
Hello @kartik, Try this: $("#YourElementID").css("display","block"); Or $("#YourElementID").css({ display: "block" }); Hope it ...READ MORE
Hello @kartik, Try this: var OSName = "Unknown"; if (window.navigator.userAgent.indexOf("Windows ...READ MORE
Hello @kartik, Try for YUI Dom.get("gadget_url").set("value",""); with normal Javascript document.getElementById('gadget_url').value = ''; with ...READ MORE
There is a solution. Have you considered ...READ MORE
Hello @kartik, Use this: // set up let start = ...READ MORE
Hello @kartik, I think that the fastest way ...READ MORE
Hello @kartik, In your db.js, export the init function. There are ...READ MORE
Hello @kartik, jQuery's empty() function does just that: $('#masterdiv').empty(); clears the master div. $('#masterdiv ...READ MORE
Hello @kartik, You can use onKeyPress directly on ...READ MORE
Hello @kartik, The following function will return an ...READ MORE
Hello @kartik, Use this code: function roughSizeOfObject( object ) ...READ MORE
Hello @kartik, throw an Error wrapping the value, which results in ...READ MORE
Hello @kartik, Use event.stopPropagation(). <span onclick="event.stopPropagation(); alert('you clicked inside the ...READ MORE
Hello @kartik, That's called load. It came waaaaay before ...READ MORE
Hello @kartik, os.networkInterfaces(), — an object, that maps ...READ MORE
Hello @kartik, You can do that with JavaScript ...READ MORE
Try this: const someInput = document.querySelector('button'); someInput.addEventListener('click', myFunc, false); someInput.myParam ...READ MORE
Hello @kartik, Use the Node.js console.time() and console.timeEnd(): var i; console.time("dbsave"); for(i = 1; ...READ MORE
Hello @kartik, Express has a helper for this as: app.get('/download', function(req, ...READ MORE
Hello @kartik, Use modern Javascript, with remove! const parent = ...READ MORE
Hello @kartik, Try this: var yourNamespace = { ...READ MORE
Hello @kartik, Try this: function delete_cookie( name, path, domain ...READ MORE
Hello @kartik, Requiring assets using the file-loader module ...READ MORE
I'm looking for a way to insert ...READ MORE
Hello @kartik, // Get the focused element: var $focused ...READ MORE
Hello @kartik, The setTimeout() function is non-blocking and will return ...READ MORE
Hello @kartik, This should do it: <Text> Hi~{"\n"} this is a ...READ MORE
There is a way of doing it ...READ MORE
Hello @kartik, This code gives you GET without ...READ MORE
Hello @kartik, Try this: $('#myForm').submit(function() { ...READ MORE
Hello @kartik, You need to wrap <input type = ...READ MORE
Hello @kartik, if you're doing $('<div>'), jQuery will also ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.