Questions for javascript


Trying to compare two Canvas elements

I am using below code to compare two canvas elements

Global windows hotkey calling js function in chrome window while it is minimized

I have a web player application, and i would like to put it on mute or unmute with a shortcut key.

Change action and image src url's with jQuery

I am parsing a form from another one of my sites using a php proxy. It is working fine but the form action and img src of the submit button url's are relative. How can I prepend the full

Find first element in div that has margin? (purpose: remove margin)

I need to find the first (and last) element in a div that has a CSS margin set (> 0 px). (important: this is not necessarily the first or last element!)

Get a tablets(iPad or Droid) mac address?

Synopsis: I am developing a HTML5 web app that will allow tablets(iPad or Droid) to login to a server and perform various functions. The client would like a way to check the devices mac address when

jQuery cookie plugin - save and call parsetInt() values

I'm new to JS. I have a script wich should count clicks and store clicks number value in cookie. The problem is i cant currectly save and call clicks number(generated by parseInt) value from cookie...

AJAX multiple checkboxes / multiselect

Alrighty then, howdy first off; quick question I have a form that has multiple check boxes with the same name (i.e. -

Semi-sandboxing Javascript eval

Background: I'm working on a framework/library to be used for a specific site in coordination with greasemonkey/userscripts. This framework/library will allow for addon support. The way it will wor...

Chrome error on downloading file via iframe

I'm submitting JSON data to a server. The server generates a PDF file and responds with the URL to that PDF file. I then make another request to the server to download the PDF file. To do the downl...

loop counting to 100 and back to 0 and up to 100 again and so on

I must admit, I am not a mathematical expert, thats why I cant solve the following problem to my satisfaction.

Determine whether html table object in javascript has the <colgroup> or not?

I want to determine that whether any html table on the webpage has the tags present or not. If it not present , I want to insert the colgroup tag in the html. I have got the table object in the

Making a function with a random name and calling it later

So I'm trying to make a function that will have a random name generated on page load, but I'm having problems calling the method later.

Javascript. Expanding a string of numbers

My script is in a google spreadsheet document

Proper way to pass on “this” to custom Tap event callback

I picked up a some code for a JavaScript tap event for touch devices here : GitHub page. Credit to Jørn Kinderås for this code.

Use of <object> from javascript to Qt c++ ( example in this post )

i'm reading a book about Qt, there is an example that i don't understand, where we use an html page : i don't understand how all the &lt;object&gt; from the html page are "analyzed" by the c++ : i ...

Share enums between C# and Javascript in MVC Razor

I have seen this useful answer to a question for adding constants into a javascript file so it can be used with razor views: Share constants between C# and Javascript in MVC Razor

AngularJS - make model variable available to jQuery?

I am just starting with AngularJS and am trying to figure out how to easily reference (bind?) scope variables from outside the Angular controller.

jqMath: How to colorize fractions inside jqMath tables

In writing math using jqMath, I have the need to highlight specific parts of math problems.

Left and right button misbehaving when trying to add an empty span to contenteditable div

In my project, I am trying to add a span wherever the caret is in the contenteditable div. This span element will be used as getting the offset position of the caret indirectly.

Is checking a string against a number good style?

Which one of these to JS snippets are better in terms of style?

Validating email and password using javascript

I know its good to use serverside validation for security, except this is just to get my head around validation.

javascript not being called

I am using this HTML

jQuery callbacks firing too early

I have a problem when assigning functions to the click event of a button in IE 7 with jQuery. Something like the following works fine in Opera but produces an infinite loop in IE:

JS: Can not convert to object, childNodes related

Ok, feeling stupid here, but wondering what the problem is here exactly.

Dynamically assign variable to jquery autocomplete query string

I'm coding form where a user can submit playlists. There is an 'artist' field and a 'song' field. Both are input type 'text'.

Javascript Marquee to replace <marquee> tags

I'm hopeless at Javascript. This is what I have:

Loading an iframe without injecting it into the DOM

I have basically the opposite problem to this question: How to prevent iframe from loading when injected into the DOM?

Javascript addEventListener to add a textbox on a click?

I need to be able to click on some text (id="txt") and fire an event which replaces that text with a textbox...currently I have this code:

Append option values to a hidden field?

With the push of a button, I'm iterating through a list of options in a select. I wish to append all of these option (values of the options) to a hidden fields, separated by a pipe |. So far I've c...

Re-sizing site's Body and iframe when the page link is clicked

I have an iframe that loads a page inside it.. when a link is clicked on the page in the iframe, resize the body of the parent aka the document that has the iframe's body..

Backslash '\' in console.log() not appearing

I'm trying to use a back slash in console.log() and within &lt;p&gt;&lt;/p&gt; but it seems that when the page loads, all back slashes are removed.

How do I get a draggable to revert to the original position only if it was dragged onto an invalid droppable?

I have an element I want to allow to be dragged anywhere. However, if it is dropped onto a droppable which refuses it (via accept) I want it to revert to the original position before the drag. How ...

Capture and Stop Middle Click

I know - this has been asked before, HOWEVER:

D3.js and coordinate system

Trying D3, and have some issues. Not sure what is the best way to endure coordinate system.

What is JavaScript's highest integer value that a Number can go to without losing precision?

Is this defined by the language? Is there a defined maximum? Is it different in different browsers?

Vertical Text Scroller jQuery

i'm searching for a jquery plugin that can scroll text in a container DIV but i can't find it. Could anyone suggest something?

Form gets submitted twice on button click

I have called below javascript function on

window.focus() not working for Chrome and Firefox

I'm trying to get the window.focus() function to work with no luck.

To set and return a variable value without creating an additional variable

Is it possible to compact the function below so there is no variable created?

How do I install/use the backbone.js framework?

I'm new to JavaScript and was wondering how you install the backbone framework so that you can use it with javascript.

javascript mootools smooth scroll by 'x' amount of pixels

I am trying to smooth scroll down 180px using javascript/mootools.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.