Imagine I've got two arrays in JavaScript:
var geoff = ['one', 'two'];
var degeoff = ['three', 'four'];
How do I merge the two arrays, resulting in an array like this?
var geoffdegeoff = ['one', 'two', 'three', 'four'];
...
I'm looking for something like http://validator.nu/, I'll be validating html input ( string ) and I want to notify the user if there are any missing end tags, whether a certain element can't have a certain attribute, things of that nature ( HTML 4.01 Strict validation basically ).
Sidenote: I won't be dealing with XML/DTDs, and I don't ...
In javascript function I am submitin a form:
form.submit();,
with huge amount of data.
Is it possible to cancel this operation beside clicking on browser's stop button?
UPDATE:
Maybe i didn't made my self clear i am submiting large files.
form with uploadcontrol that runs in iframe.
...
Are there any resources comparing the adoption rates of the various javascript frameworks similar to tcpi? Basically the number of sites using a particular framework on a time-line would be ideal.
...
It has been hours already trying to find out if jQuery (or any javascript) can actually work inside the TinyMCE editor as it's the most powerful and customizable utility in its class. Search by search i understood what's the deal with .tinymce({ cleanup: false, extended_valid_elements: 'script[type|src]' });
but instead of CDATA sections...
I've found a couple resources for how to place the cursor in a textarea at the end of the text, but I can't sort out a simple way to make it appear at the beginning.
I'm prepopulating the textarea with some text and just want to make it easier on the users.
...
I am trying to build a web application to help students memorize answers to test questions.
I have a mySQL database containing the questions, answers, categories, difficulty ratings and random numbers (for sorting the questions randomly).
What I need to do is allow the user to choose a category, then the app will display the questions ...
I'm using JQuery to create a Horizontal Accordion menu (based on the tutorial at Design Reviver. I have it working well, but I need to add a second Horizontal Accordion menu just like it to the same page. I'm sure this can be done, but I don't know how to adjust the script in the head section so that both menus work at the same time. I'v...
I have a specific question about instantiating a QuickTime object in Internet Explorer.
QuickTime in IE uses an <object> as a 'behaviour' template in order to enable DOM events. The behaviour <object> is referenced from the QuickTime plugin instance with IE's behavior style: style="behavior: url(#id_of_behavior_object)".
This works gre...
I've been trying all sorts of things and can't figure this out!
For some reason on the Django development server the paths to the javascript just don't work.
Directory structure is
site
|
appName static templates
| | |
views.py javascript appName
| ...
This is an example of my code:
bar = function() {
this.baz = function() {
this.input = $('.input');
this.input.bind("keydown keyup focus blur change", this.foo);
}
this.foo = function(event){
console.log(this);
}
}
Clicking on my input gives me the very input in the console, obviously. How can i get bar as this inst...
What is the cleanest format for writing javascript objects?
Currently I write mine in the following format
if (Namespace1 == null) var Namespace1 = {};
if (Namespace1.NameSpace2 == null) Namespace1.NameSpace2 = {};
Namespace1.NameSpace2.Class1 = function(param1,param2){
// define private instance variables and their getters and s...
If you click on:
http://store.apple.com/us/product/MAC%5FOS%5FX%5FSNGL
And then click on "Find out which version you're using":
I appreciate that they probably paid it to be royally customised, but I can't seem to find one that is close in terms of how it pops up and style etc.
...
I'm working on a project (BrowserIO - go to browserio dot googlecode dot com if you want to check out the code and work on it. Help welcome!) in which I'm using Firefox's nsIFileInputStream in tandem with nsIConverterInputStream, per their example (https://developer.mozilla.org/en/Code%5Fsnippets/File%5FI%2F%2FO#Simple), but only a port...
Example:
How to convert hexadecimal 8F to decimal?
...
I'm using jQuery. I have website feature that does an ajax search and returns a JSON result. The ajax callback then populates the rows of a table with the results. Generally, there are 100 rows per search that get inserted. Each row has a fair amount of data.
The code looks something like this (very much abbreviated):
function sear...
Hello, I am trying to make a line chart by using the Google Visualization API, here is my column data definition:
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('date', 'Date');
dataTable.addColumn('number', 'Uptime');
dataTable.addColumn('string', 'Channel');
I want to group my rows by channels and these g...
Hello.
I have the following code - it is used to load a drop down when the user clicks on a drop down with only the loaded default option, because this drop down is quite large and IE doesn't like that very much. Here is the code:
function populateDropDown(id, code) {
var currentSelect = document.getElementById(id);
<%--Don't ...
I've got an XHR request that's succeeding in FF3.5 but apparently failing when done in Safari 4. I'm looking at the xhr requests in the debugger in Safari, and Firebug in Firefox.
So on the backend service that's being hit, if the username and password are missing from the POST parameter then the service gives a 500 error. If the parame...
If an http request is made and the caller abandons the request does it get completed anyway? For example an asynchronous JavaScript GET request to log a banner click in the DB then redirect. Does the script need to wait for the response?
...