Ok dokey, got a bit of jquery up and running, lovely stuff.
$(document).ready(function() {
$inputs = $("#tbxProdAC, #ddlBuyer, #txtbxHowMany, radTopx");
$.each($inputs, function() {
$(this).focus(function() {
$.each($inputs, function() {
$(this).val('');
$(this).at...
what is the maximum length of a variable NAME in javascript?
...
I have a Flash movie that is embeded in a PHP page. The PHP page displays a value to the user (the number of images they have uploaded). When the user uploads a new image I want the value on the PHP page to reflect the change without refreshing the page.
This value is retrieved from database using MySQL. So heres what Ive done so far -
...
Hi guys,
I try to make Folder for things in my ASP.Net Application (e.g. all with Finance in /Finance).
No I bind an JavaScript in the MainPage:
<script type="text/javascript" src="Helper/jquery-1.3.2.min.js"></script>
But when I now open ~/Finance/Payment.aspx I get an JavaScript Error with "Path ~/Finance/Helper/jquery..." not fou...
Scenario:
My_Object = {
my_div: "#mydiv",
my_method: function()
{
$(this.my_div).fadeOut("slow", function() { $(this.my_div).fadeIn("slow"); });
}
}
'this.my_div' is not being recognized in the fadeIn call, as 'this' doest point to the original object anymore. How to I pass the original object to the callback function?
...
What I'm doing is adding a class to all elements who have the same class name as the id I'm hovering over. For example when I hover some list item with the id of vowel, then all the span elements with the class of the name vowel get acted upon (adding a class).
I can do that with no problems. But I want to do the same thing for many oth...
Hi.
I've added some useful helpers to Array (such as toSource() for Opera). And now for..in returns the functions with normal properties.
I'm using for..in now, because the code is easier to read with it. And it's a native functional of js, so must be faster.
But adding type checks in loop makes it easier to use classic for(;;).
Is t...
Hi,
I'am currently developing a Facebook application which has a iFrame in it. The iFrame loads a Java applet (So the FBML Page is just a wrapper for header footer and the FBML functions).
The current situation is, for example, the Java applet has a event (User finished playing a game) and it does a javascript call on the iFrame page. ...
I have an array comprising records
v = [{stringA, stringB, arr[{stringC,stringD}]
When I try to extract the value of stringA and stringB, Javascript returns {Object, Object}
I am trying to use
strX = v[4].arr[2].stringC;
(this approach works when extracting stringA and stringB, but not when extracting stringC)
Please, does an...
In Nodejs, there are virtually no blocking I/O operations. This means that almost all nodejs IO code involves many callbacks. This applies to reading and writing to/from databases, files, processes, etc. A typical example of this is the following:
var useFile = function(filename,callback){
posix.stat(filename).addCallback(function (...
I'm having trouble implementing this jQuery plugin for dynamic forms while following this tutorial
This simple code is giving me an error in Firefox 3.5.5.
$(document).ready(function(){
$('#duplicate').dynamicForm('#plus', '#minus', {limit:5});
});
and the error:
"$("#duplicate").dynamicForm is not a function"
There is an ...
I watched a talk by Douglas Crockford on the good parts in Javascript and my eyes
were opened. At one point he said, something like, "Javascript is the only language where good programmers believe they can use it effectively, without learning it." Then I realized, I am that guy.
In that talk, he made some statements that for me, were...
I've read some of the other related questions (http://stackoverflow.com/questions/214491/pattern-for-wrapping-an-asynchronous-javascript-function-to-make-it-synchronous & http://stackoverflow.com/questions/518880/make-async-event-synchronous-in-javascript & there may be more), but I just want to be sure to exhaust all possibilities.
M...
Hi,
I have a set of divs table-like (with rows and cols), to display a soccer table. Now, I need to be able to order that table according to the key chosen, without refreshing the page and avoiding using ajax.
Being more specific, I need to catch the values inside each "columm" refeering to the key chosen and re-order the table.
I us...
Hi,
Im running a javascript code which reads values from different XML files and it generates a multidimentional array based on those values. Now I need to pass this array to a PHP page. I tried different but it always pass the arrray as string not as an array.
Anyone has an idea :( ... and thank you very much
...
when i make a AJAX request with this code, it returns the status as 0. what did i do wrong? Also, this code is only designed to work in Firefox for various reasons.
var ajax;
function connectToOtherServer(server,port,userid,password){
ajax=new XMLHttpRequest();
ajax.onreadystatechange=validateConnection;
params='userid='+encodeURICom...
I need to use AJAX to get the content of another page located on a different server from the one the AJAX is loaded from. The AJAX needs to send a POST request then return the result. how can i do this?
...
This code causes a strange bug in ie8. It comes from MicrosoftAjaxAdoNet.js in link text
function Sys$Data$_AdoNetBatchWriter$startChangeSet() {
this._changesetBoundary = "changeset_" + this._createBoundary();
this._changesetEntries = [];
}
Before calling this function, this._changesetEntries is always null. I e...
In OO Javascript constructor pattern: neo-classical vs prototypal, I learned that constructors using prototypal inheritance can be 10x faster (or more) than constructors using the so-called neo-classical pattern with closures as proposed by Crockford in his "Good Parts" book and presentations.
For that reason it seems like preferring p...
Hi,
I'm trying to loop through an array "fSel.sI", and based on the data inside, pass them as values (not reference) on to a number of function declarations. Right now the problem is that mydrag contains a reference, and as draggable gets called it uses the last array item data. Hence when start: drag: stop: is called, the values are no...