I'm trying to setup a function in JavaScript to fade in or fade out some elements on my page. The fade themselves work fine, but my problem occurs when one of them tries to cancel the actions of the other one.
//I know this is ugly, I'm just learning JavaScript again and plan to recode it after I learn some more...
var fadeOut = false
...
Hi all,
This problem is regarding a JS hijacking scenario, and here it is :
Say Mr. Good has a website called "iamtooinnocent.com" which loads a "x.js" file to perform some particular tasks, and Mr. Bad is an evil cyber cafe owner, who has set a redirect rule in place that whenever any surfer using his cyber cafe visits Good's websi...
I have a task to show digital clock (with minutes precision) on HTML page in some fixed timezone (MSK or MSD - depending on current date). I'd like to avoid relying on client system clock, so some synchronization with server is required. HTTP server sends Date header in each response so we can send an AJAX GET or HEAD request to any URL ...
Hello everybody!
On my page I have two kind of columns with several conainers in it.
Now I want to be able to sort these containers in these two columns.
This was not really a problem.
I can sort my containers in the two colums and toggle it on or off.
But now my problem:
I want to sort my containers on reload.
I want to sort and toggle...
Is it necessary to learn java script before jQuery?
...
Hi all,
I got UTC timestamps and want to display them for different timezones.
Maybe an example can clarify what I am trying to do:
Given the timestamp 1259431620000 those times should be displayed:
Atlanta 13:07
San Francisco 10:07
London 17:07
Sydney 04:07
The cities m...
Hey,
So far during my site development I have been storing all my jQuery functions in an external .js file, below are two examples of the functions inside:
// Loads the login form into the page.
function loadLoginForm() {
$('[name=loadLoginForm]').click(function() {
$("#loadingImage").css({ display:"block" });
$("#mainWrap")....
I was just using the plugin "Yslow" for Mozilla Firefox and it told me that I should put JavaScript at the bottom. I have heard this before but haven't really thought about it too much. Is there really an advantage in putting JavaScript at the bottom of a web page compared to the top?
...
I have a form that I am using innerHTML to view the contents of one div in another div. When the user clicks the button, they should be able to view their template. However I am dragging a tree from an XML file and even though the code runs, I get undefined as an output. Am a newbie at this, so any help would be much appreciated!
Any th...
I'm trying to have a simple html table, that highlights a row as a user mouses over it. Unfortunately the css hover item doesn't work for IE. That leaves me to simulate it in javascript. I can use either onmouseenter or onmouseover.
What is the difference between them, and which one should I use?
...
How can I make a div element move up and down the page when the user is scrolling the page? (where that element is always visible)
...
(function() {})() and its jQuery-specific cousin (function($) {})(jQuery) pop up all the time in Javascript code.
How do these constructs work, and what problems do they solve?
Examples appreciated
...
Hi,
I've recently started creating some jQuery plugins and I'm finding it difficult to document them with the documentation generating tools that I've found. I've tried: JSDoc, JSDoc-toolkit, JGrouse and a web-based tool also. My biggest headache is that my plug-ins are coded as one big anonymous function, and I'm having trouble getting...
I've used the following js code to expand/collapse all nodes of an ASP.Net TreeView control:
// handle tree - this doesn't seem to work when the tree contains node images
function TreeviewExpandCollapseAll(treeViewId, expandAll) {
var displayState = (expandAll == true ? "none" : "block");
var treeView = document.getElementById(t...
Form validation plugin:
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Test url:
http://docs.jquery.com/Plugins/Validation
How to reproduce:
1.) Click on the name text input. Enter "12345".
2.) Tab to the next field. Enter an invalid email such as "12345@".
3.) Click on the name text input. Delete the data in the field....
I have a button and the following javascript routine.
$("button").keydown( function(key) {
switch(key.keyCode) {
case 32: //space
return false;
}
} );
as I understood it, the return false; would stop the keypress from being processed. So $("button").click(); would not be called. For other keyCodes this works as expected. For...
Hi all, i have to delete some elements of my array, but without rearrange array.
If i use "delete" to delete my elements, the "holes" take up memory?
var array=["A","B","C"];
delete array[1]; // array -> ["A", undefined, "C"]
I think the deleted element is really deleted so it isn't take up memory space, isn't true?
Thanks.
...
I have a UI problem I am trying to figure out how to make it intuitive to use.
I have a list of items, that is in no order, and flat. I need to figure out a way to use DnD in javascript to allow the user to reorder them (that is easy), and to put them into a hierarchy as I have below.
I don't know if I want to go with how Visual Stud...
What are the differences between these two codes in JavaScript?
var obj = new Object();
obj.X = 10;
obj.Y = 20;
And,
var obj = {X:10, Y:20};
...
Maddening problem here.
When my page loads: <body onload="getClientDateTime();">
It runs this function: document.getElementById('ClientDateTime').value="hello world";
Which theoretically should insert "hello world" into a hidden field: <INPUT TYPE="hidden" name="ClientDateTime" id="ClientDateTime" value="">
But she no worky.
If I ...