I have an object x. I’d like to copy it as object y, such that changes to y do not modify x. I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties. This isn’t a problem, since I’m copying one of my own literal-constructed objects. How do I correctly […]
Tag: javascript
How do you add CSS with Javascript?
How do you add CSS rules (eg strong { color: red }) by use of Javascript?
Disable Drag and Drop on HTML elements?
I’m working on a web application for which I’m attempting to implement a full featured windowing system. Right now it’s going very well, I’m only running into one minor issue. Sometimes when I go to …
Change cursor type for an html document from javascript
Let’s say I have a javascript method that takes a little to long to finish to go without any user feedback at all. In my case it’s sorting the rows in a table element (all in the DOM; only takes too long if there are a lot of rows), but it might do anything. I want to show the “progress”
How can I get the memory address of a JavaScript variable?
Is it possible to find the memory address of a JavaScript variable? The JavaScript code is part of (embedded into) a normal application where JavaScript is used as a front end to C++ and does not run …
How to load up CSS files using Javascript?
Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done? P.S the javascript will be hosted on my site, but I want users to be able to put in the <head> tag of their website, and it should be able to import a css file […]
Get next / previous element using JavaScript?
How do I get the next element in HTML using JavaScript? Suppose I have three <div>s and I get a reference to one in JavaScript code, I want to get which is the next <div> and which is the previous. Answer Well in pure javascript my thinking is that you would first have to collate them inside a collection. So
How to create a tag with Javascript?
I’m looking for a way to insert a