Questions for javascript


Increasing performance of loops

I'm currently working on a script that helps to manage connections to phone numbers with different things like contacts, text messages, etc. The big problem with phone numbers in our data is that a...

How to pass array from server side to Javascript function on client side

How do I pass an array I have created on the server side onto the client side for manipulation by Javascript?

Increase element ID by one after every click?

I am trying to clone multiple divs on my page by using the jQuery .clone() method. The problem is, as soon as a div is cloned, it needs to have a unique ID. The cloned ID has to be there too. I was

This is ugly and there has to be a better way to write it in jQuery


Replace Components.classesByID with document.implementation.createDocument

I am not the author of this code, but it is no longer maintained. So I am trying to fix it, but I have very little experience in javascript.

Scriptmanager Asp.Net Mvc

I'd like to have some of the scriptmanager features in the new MVC model

Is it safe to compare JavaScript's getTime() across different systems?

JavaScript's getTime() returns "the number of milliseconds since 1 January 1970 00:00:00 UTC".

Canvas Script Not Working

I'm using this script on Wordpress and it works fine. However, I've decided to switch to Blogger instead. Now when I include it in the Blogger template, it doesn't work and I get this error in the ...

ExtJS TreeGrid's Node mouseover event

I have googled and didn't find anything for extjs TreeGrid's mouseover event example. I tried

Timeout doesn't work

function updateimage(){

How can i combine this codes?

As the title says, I think this code can be simplified in less lines. Could someone help me with this?

how to hide a div that is empty and another div associated with it which may or maynot be empty?

I have a speech bubble called philosophy bubble which is just a div styled to look like a quote bubble and the sharepoint control is what fills up the content of the bubble but sometimes the bubble...


I am getting this JavaScript error, doing some research people are saying something about instantiating an object.

processing.js rect() different border colors

I'm drawing a game grid with rect() and I'd like some borders of my rectangle have different colors.

Javascript: Radio button and displaying images based on a vaule

I am currently working with displaying images based on the value chosen from a radio button. But I am currently running into a wall with making the code as short and efficient as possible. I have s...

getElementById not returning proper value (maybe syntax issue?)

I am using XSL to write this page, and when I hit a checkbox it sends the information to my javascript function. This all works in IE, but Chrome it does not. The problem is, after I hit the chec...

How to use jsonp to get javascript based ad calls onto a page, asyncronously

I am trying to use jsonp to solve a page performance problem I've been having. On my site I usually display ads by writing out a script tag like this document.write("<scr" + "ipt

Dynamically populate two dropdown menus

I'm not (as I am certain you'll notice below) a programmer or coder. I write network documentation manuals.

javascript “include” strategies

Duplicate of:

Setting variable name based on loop iteration

I hope I'm not overlooking an extremely easy solution when I ask this question.

UTC clock based on server time?

I have a JavaScript clock that gets the time in UTC, it currently works, but the time is based off the client's computer. What could I do to base the time off of the server instead? I am using PHP ...

Changing the stylesheet of a nested page at runtime

First off, I apologize if this doesn't make sense. I'm new to XHTML, CSS and JavaScript.

Why is character encoding important for URLs?

I'm currently learning JavaScript, and I don't understand why it is important to encode URLs.

Fix :hover issues on iOS devices, universally with jQuery

At the moment I'm having a following issue, when I first tap on something the :hover state gets triggered and I than need to tap second time in order to actually click an element. Fixes I found were

How to store temporary data at the client-side and then send it to the server

I need to store data temporarily at the client-side to allow users to add, edit or delete items without having to query the server for each of these actions; just when the user finishes adding item...

How to substitute the “0” with “i” in the below line inside for loop in javascript?

How to substitute the "0" with "i" in the below line inside for loop in javascript?

Javascript Date Object from string in form 'HH-MM'

Hey, just wondering how to convert an HH:MM string into a javascript Date object. I have tried new Date(string); and myDate.setTime() but to no avail.

jquery to get next input element

I have a number of checkboxes. Each of them is associated with one input field. When the checkbox is checked, I would like to set the input field is editable, i.e. disabled attribute as false. Othe...

Mapping an array of objects to key/value pairs in CoffeeScript

I have an array of elements that I would like to apply a mapping to to convert it into key value pairs on a single object (to mimic an associative array).

Is it possible to use disproportionate intervals in jqplot?

I am using jqplot for a bar graph that has 1 very high number around 7 million and 2 very low numbers, less than 100,000 when they are charted on a bar graph the two low numbers are only a couple of

React to 303 status code in jquery ( Prevent from redirecting)

when I send requests to a certain server, a 303 response will come, followed by the requested response in combination with a 200 status code.

How can an HTML page extract parameters passed through a form?

My question is should I convert two html pages to php pages, so the called page can access its POSTed parameters, or is there a way for a called html (.html extension) page to access posted paramet...

Alternative Web file explorer/Navigator

I've found this online file explorer called enCode eXplorer. It was just what I was looking for; a simple, clean, free, easy-to-edit system, completely made up of one php file. The only problem I h...

Encapsulating ajax call fails probably because of object visibility

I have this piece of code that is supposed to work on Firefox 3.6 . The problem is that the variable this.xmlhttp that should be defined to STEP2 and used on STEP3 acts as if the code on STEP2 and ...

Update and remove operation on Jaydata

I'm trying to write a simple CRUD functionality in Jaydata, I had written this simple code for update operation:

Trying to enable a disabled button when a textfield is not empty

So im just trying to enable a button when 3 text fields are not empty,and disable the button again if they become empty.Right now I was only trying it with one field just to get it working first bu...

Regex to pluck portion of URL returning array with “undefined”

I'm making a bookmarklet for use on Google Plus. I'm a little light on my regex, but the following test almost works.

$.ajax() success called, but will not run method

This is really puzzling me. Any idea why this would be happening?

how to remove google maps control

i am implementing google maps on my website, but i want to remove satellite and map options from my maps which is shown on right top, also pan controls.this is my code,

TCPDF not formatting

I'm using an ajax call to print a pdf and email it to user, but the problem is that the data in the pdf is not formatted.

JQuery iterate through current SELECT values

how do you iterate through just the current values of all selects, not the options?

Yahoo maps api, version 3.8 doesn't display custom image?

I used the following code to display custom marker on Yahoo Maps :

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.