javascript

Is there a Javascript based firefox plug in to analyse people's writing style on google docs?

Right now I'm trying to get it to tell when the user has done a copy, cut, or paste operation and log what has been copied/pasted. Essentially I want it to grab the clipboard after the user copies or cuts, and put it in a log file. Basically, I need a way to grab the system clipboard, and a way to output a log file of what the javasc...

Using the IE8 'Developer Tools' to debug earlier IE versions

Hi guys and gals I am less than satisfied in my HTML/CSS/JS debugging of pages with IE6 and 7 specific bugs. I am aware that IE8 has a Firebug clone, called 'Developer Tools' installed. Is it possible to have IE8 installed (maybe on a VM, i don't mind), set it to compatibility mode (is there one for IE6?), then perform JS debugging a...

Copy Paste using Javascript

I have two textBoxes lets say EmailID and UserId. Currently when a user Types his/her EmailId the same gets shown in the UserID TextBox, for this I am using OnkeyDown event javascript. The Issue That I am having is if the user copies the EmailId an Paste it in the EmailId textBox then the OnKeyDown event is not fired, is there any other...

What causes this error with for...in after assigning Array.prototype.indexOf?

I was surprised when I was able to reproduce a bug with a minimum amount of code. Note that in this minimalist example Array.indexOf isn't being called. Also note that I've tried several different implementations of indexOf, including several from stackoverflow.com. The bug is, when the for...in executes in IE, three alerts are displaye...

How to disable Back button in IE and firefox?

Duplicate: Disabling Back button on the browser Prevent Use of the Back Button (in IE) I have to disable back and forward button of browser ( IE and Firefox both ). I have tried: //disable back button window.onbeforeunload= function() { } window.history.forward(1); but this works only in IE. Is there any foolproof so...

setTimeout but for a given time

Is there anything readily available in JavaScript (i.e. not through "plugins") that allows me to do something like setTimeout, but instead of saying in how many milliseconds something should happen, I give it a date object telling it when to do something? setToHappen(function () { alert('Wake up!'); }, new Date("...")); And yes, I...

Monitor clicks/goals Google Analytics with iframes?

We've got a site that shows some content in iframes loaded from another domains. What I'd like to do is setup some Goals to track if this stuff is clicked, is this possible to track these clicks? I know that this content us outside our domain but is it still in the dom? ...

Make a date object take timezone into consideration

I'm using the following piece of code: $.log('Ending time: ' + ending_time); $.log('Now: ' + new Date()); $.log('Difference: ' + new Date(ending_time - new Date())); The output is the following: Ending time: Thu Apr 23 2009 14:31:29 GMT+0200 Now: Thu Apr 23 2009 11:56:02 GMT+0200 Difference: Thu Jan 01 1970 03:35:26 GMT+0100 I'm us...

How to detect if IE is having JAVA blocked (security)

How to detect if IE is running with HIGHEST security and JAVA APPLET will not appear. It seems IE does not show alternative content of java object in this case. I like to display some instructions to end user how to adjust their security settings IF java is disabled. Is there difference in INTRANET ZONE how this works when compared t...

TinyMCE: Using CSS class attributes with the formatselect-dropdown formats.

I would like to customize the formats in the TinyMCE formatselect dropdown to support css class attributes. Example: If would like to be able to select <h2 class='foo'> instead of just <h2> as format in the formatselect dropdown. Does anyone here have an idea how I could do this? ...

Page transitions on websites?

I was just wondering if there are any methods of creating nice, smooth transition effects when navigating between pages? Things like blind effects, sliding effects, etc. I guess I'm looking for something like what jQuery can do with images - but for actual web pages. I know there are fade effects and all that, but I was just wondering if...

Can the parent window be notified when a child window closes? (on a diff domain)

Can the parent window be notified when a child window closes? (on a different domain?) Trying to get around the window.opener not working when on different domains. Can I at least be notified somehow when the child window closes? ...

How to pass a parameter to an inline javascript function

I'm trying to pass story_id into the innermost inline function, but its always 0 even though its not 0 in the outer function. How do I pass this value in? function activateSearch(){ if($('story_filter')) Event.observe('story_filter', 'keyup', function(event) { $('stories_table').select(".story").each( function(story...

jQuery Form Input

I'm trying to use a radio button as a click function: $("input[type=radio]").click(function(){ and I don't just want radio buttons, I want radio buttons with the class 'baby', or I could even do it by name if that's easier, searched google and I can't find anything :( ...

javascript - accessing a field of datatype varchar(max) in resultset

Within a javascript app, we're calling a sproc on SQL Server 2005 that's returning a resultset with 3 columns of type: bigint, varchar(20), and varchar(MAX). When calling the sproc and reading the results, there's no exception being thrown. When enumerating the resultset: var dbConn = DatabaseConnectionFactory.createDatabaseConnection(...

Asp.net Webform Display Alert and redirect.

Hi all, I'm currently stuck. I have a webform with a button that registers or saves a record. What i'd like to is have it display a javascript alert and then redirect to a page. Here is the code i am using protected void Save(..) { // Do save stuff DisplayAlert("The changes were saved Successfully"); Response.Redirect("D...

Is it worth the effort to have a function that returns the inverse of another function?

I have recently added a HasValue function to our internal javascript library: function HasValue(item) { return (item !== undefined && item !== null); } A during a convorsation with a coworker, we came up with the idea of also adding another function that would basically just be the inverse: perhaps HasNoValue, or IsNothing If we ...

Registering Javascript in a cached control

I have a user control that is cached and as part of this control, javascript for loading a swfobject is written to the page. I've tried using ClientScript.RegisterStartupScript to write the javascript to the page, however, when rendered from the cache, the javascript is no longer included. This means the swfobject is not loaded. Curre...

Method to render rounded corners on form submit buttons

What I'm looking for is a clean method to round the corners of all inputs with the class "submit". I've experimented with a number of javascript techniques, but none worked well for form elements. Pure CSS would be great, but, note, the button needs to expand, and will have arbitrary text. Other methods required really ugly HTML cruft ar...

Javascript Unix Epoch Time Strangeness

I have a portion of script that calculates the days remaining to an event: var currTime = Math.round(new Date().getTime() / 1000.0); var dispDate = event.find('UnixEpoch').text(); var diffDate = (dispDate - currTime) / 86400; var dateRound = Math.round(diffDate) - 30; The first line gets the current Unix Epoch time and shaves off the ...