I have a page with a few buttons on it. One of them causes a file to download. That process is very server cpu intensive so I don't want them to click it twice.
So I've got javascript to block a double click.
The problem is I want to unblock it when the file downloads. I have a setinterval doing xmlhttp requests updating the status on th...
I want to attach a timestamp to my querystring in order to ensure that the browser bypasses its cache when I refresh the page via javascript. I need to account for an existing querystring (which might already have a timestamp parameter in it) and for the hash tag (http://www.example.com/?ts=123456#example).
I have written my own implem...
I'm trying to manually clean the HTML of a Telerik RadEditor with Javascript but I can't seem to find the correct place to store the value so that it gets saved on post back.
Here's the JS I have:
$(function () {
jQuery.fixHash = function ($html) {
// modify $html
return $html;
};
$("#adminEditi...
My method fades a div box out and has a callback that calls a method... like this:
function closeWindow(windowIdPrefix, speed) {
$("#" + windowIdPrefix + "_ViewPanel").fadeOut(speed,
function() {
resetWindow(windowIdPrefix);
numWindowsOpen--;
}
);
}
function resetWindow(windowIdPrefix) {
...
I am binding things to HTML objects using javascript and need a slightly more sophisticated mechanism than just class names.
My first approach was to use class names like structure declarations where the binding is on name position as so:
Definition = identifier: foo bar baz
Encoding some class name with this definition gives
<p i...
I know why the post fails, but I'm not sure how to resolve it and I can't find any other references to this. I'm taking our references to jEditable to make this simpler, as it happens without the jEditable plugin.
So how the heck do I "escape" the keyword so that it posts correctly? Here's relevant code:
Test
<scri...
When using NyroModal to display images it automatically shows the image count of how many are in the collection in the H1 tag when the popup occurs i.e. "1/3", "2/3", "3/3"
Does anyone know how to siwtch this off or manipulate the h1 tag?
I'm also interested in NyroModal automatically positioning the h1 tag at the bottom of the image i...
Just wonder.
I have extended javascript Array object using its prototype as follows:
<html>
<head>
</head>
<body>
<script type="text/javascript">
function SomeMethod(){
alert('Hello');
}
if(typeof Array.prototype.SomeMethod ==='undefined' ){
Array.prototype.SomeMethod = SomeMethod;
}
var ax=new Array("A","B","C");
for(...
I'm using jQuery 1.3.2 and it's breaking under Safari 4 for mysterious reasons.
All of my javascript references are made right before the tag, yet with the following code:
var status = $('#status');
status.change( function(){ /* ... */ } );
The following error is displayed in the Web Inspector:
TypeError: Result of expression 'sta...
Div box dimensions are measured using jQuery with following code:
$(document).ready(function(){
var h = $("#testbox").css("height");
});
In FF it gives for me 270px, in IE auto. How can I measure actual div height/width in IE without changing it's css?
...
i have an object with 3 values
ID
Abbreviation
Description
in the jqGrid I set the grid up to display the Abbreviation.
when I click to edit (using the Form Edit feature) I fill the drop down with the ID/Description combination of values via the edit options:
editoptions: { value: "ID1:Description1;ID2:Description2;...;IDN:Descript...
I'm new to the whole JavaScript and jQuery coding but I'm currently doing this is my HTML:
<a id="tog_table0"
href="javascript:toggle_table('#tog_table0', '#hideable_table0');">show</a>
And then I have some slightly ponderous code to tweak the element:
function toggle_table(button_id, table_id) {
// Find the elements we n...
I want to make a custom Array object that recieves a number as index, and depending on the value of the index, it would return a computed value.
For example:
>>> var MyArray(2);
>>> MyArray[2];
4
>>> MyArray.2;
4
I know that for the showed example, I'm better of with a function, but I want to know if I can override the properties/ind...
I'm not at all familiar with Tapestry 4.0.1 and need to update a legacy application to display a formatted tooltip for a few links within a @For loop. What is the easiest/best way to go about accomplishing this? Should I be using the @Script component or is there a simpler way?
By the way, upgrading to a newer version of Tapestry is ou...
I have a string, such as hello _there_. I'd like to replace the two underscores with <div> and </div> respectively, using javascript. The output would (therefore) look like hello <div>there</div>. The string might contain multiple pairs of underscores.
What I am looking for is a way to either run a function on each match, the way ruby d...
Hello,
I have a GridView which supports deleting. I'd like to add a pop up window with a question like 'Are you sure you want to delete this row?'.
My code:
<asp:GridView id="GridAccounts" runat="server" AutoGenerateColumns="False"
ShowFooter="True" DataKeyNames="ID"
DataSourceID="AccountDataSource" onrowcommand="Gri...
Hey,
I am looking for a smart way to emulate the iPhone Springboard behavior of changing icon possition. I just want to change few icons on ONE screen.
It should be run in JS on a webpage.
Any suggestions to start?
Thank you very much
...
So I'm working on a project that will, in the end, generate a kind of flow chart using the Flickr api. You will supply a seed tag, and the program will use that seed tag to find other related Flickr pictures that have common tags...
I have all of the back end stuff up and running but I'm stumped on the formatting. Here is a screenie of...
Hey,
I already have quite a bit of js on my site, so I want to have a function that grabs the domain name of the current url as efficiently as possible.
Example:
input : http://stackoverflow.com/questions/ask
result : stackoverflow.com
input : http://test.stackoverflow.com/questions/ask
result : test.stackoverflow.com
I guess the...
I have a simple content management system that stores pages by Pagename and Version. After clicking on Save, my code (server side) checks for the existence of Pagename/Version.
If it exists I would like to display a confirmation dialog box, which asks the user to confirm whether or not the current Pagename/Version should be replaced.
...