javascript

Does a Javascriptable FTP Upload Java/Flash Applet exist?

To be able to upload large files from a HTML page to a FTP server, I am looking for a Java/Flash FTP upload applet. I really like the way dhtmlxVault works, but I need it to upload to a FTP server instead of a HTTP file upload. It would be really nice if the applet has no GUI of it's own, but instead is fully scriptable using Javascrip...

Jquery Validation : How to display error container only when Submitting?

I am trying to make work the Validation plugin. It works fine for individual field but when I try to include the demo code for the error container that contain all errors I have an issue. The problem is that it show the container with all error when I am in all fields BUT I would like to display the error container only when the user pre...

Is there any way to 'hide' a JavaScript file from IntelliSense in Visual Studio 2008?

I have a third party JavaScript plug-in but including the file breaks IntelliSense for jQuery amongst other things. The only way I can get IntelliSense back working with jQuery is by commenting out the plug-in. Is there a way I can hide the plug-in file from the IntelliSense parser? ...

Find html label associated with a given input

Let's say I have an html form. Each input/select/textarea will have a corresponding <label> with the for attribute set to the id of it's companion. Given an input element in javascript --via an onkeyup event, for example--, what's the best way to find it's associated label? ...

Remove blank attributes from an Object in Javascript

How do I remove all attributes which are undefined or null in a Javascript object? (Question is similar to this one for Arrays) ...

TinyMCE Draws Okay, But Won't Let Me Type In It. In FF, Buttons Have Error: Component returned failure code: 0x80004005

In previous applications, I was able to get TinyMCE to work just fine. But in this web app, I get the rich editor to show up okay, but for some reason I cannot type into the rich editor field and when I click a button like for bolding, I get this error: Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)...

Javascript error handling with try .. catch .. finally

I have a suspicion that I'm using the finally block incorrectly, and that I don't understand the fundamentals of its purpose... function myFunc() { try { if (true) { throw "An error"; } } catch (e) { alert (e); return false; } finally { return true...

JavaScript: closing window from iframe

I have a page P1 loading from site S1 which contains an iframe. That iframe loads a page P2 from another site S2. At some point P2 would like to close the browser window, which contains P1 loaded from S1. Of course, since P2 is loaded from another site, it can't just do parent.close(). I have full control over P1 and P2, so I can add Ja...

YUI: RTE: focus and blur events

Is it possible to get the equivalent of the focus and blur events that we have on other form controls for the RTE? That is, I would like to know when a given RTE gets the focus and when it loses it. I see that the RTE supports lots of events (http://developer.yahoo.com/yui/editor/#events), but I don't see anything about focus/blur. Am I...

Extending every Ajax.Request onSuccess event (Javascript Prototype Framework)

Hi, I have an application that uses Ajax.Request and its onSuccess event handler in lots of places. I need to call a function (that will check the response) before all these onSuccess events fired. I tried using Ajax.Responders.register with onComplete event but it fires after Ajax.Request's onSuccess event. Any suggestions? Thanks, ...

Set web part personalizable property from JavaScript

I have defined a personalizable property on a web part and I would like to modify its value from JavaScript. Is it possible? ...

Simple Password Javascript Code?

Hi, I need a Javascript application that, when run, prompts a password to be entered, and if the password is correct, the script causes the webpage to close. If the password is incorrect, the script prompts for the password to be entered again. I'm planning on loading this script onto my cell phone, which doesn't have a password-protec...

JavaScript: Efficiently replace all accented characters in a string?

For a poor man's implementation of near-collation-correct sorting on the client side I need a JavaScript function that does efficient single character replacement in a string. Here is what I mean (note that this applies to German text, other languages sort differently): native sorting gets it wrong: a b c o u z ä ö ü collation-correct...

How can I get the user response regarding SaveFileDialog in Javascript?

Hi all, The following code is implemented in Page_Load event to show SaveFileDialog to the user string targetFileName = Request.PhysicalApplicationPath + "Reports\\TempReports\\FolderMasters" + Utility.GetRandomNumber() + ".pdf"; FileInfo file = new FileInfo(targetFileName); // Clear the content of the response. Response.ClearContent(...

reference path re javascript intellisense

I am trying to get intellisense in VS2008 in a js file, foo.js, from anther js library/file I've written but cannot figure out the reference path ?syntax?/?string? The library is in a file called common.js which is in the same folder as foo.js I'm working on. Here's the paths I've tried... /// <reference path="../../scripts/common.js"...

Can a JavaScript modal dialog be modal only to the tab and not to the whole browser window?

Modern browsers have multi-tab interface, but JavaScript function window.showModalDialog() creates a modal dialog that blocks all of the tabs. I'd like to know if there is a way to create a modal dialog that blocks only the tab it's been created in? ...

How to stop title attribute from displaying tooltip temporarily?

I've got a popup div showing on rightclick (I know this breaks expected functionality but Google Docs does it so why not?) However the element I'm showing my popup on has a "title" attribute set which appears over the top of my div. I still want the tooltip to work but not when the popup is there. What's the best way to stop the tooltip...

frameset - swap columns with rows using javascript.

Hey everyone, I have a frameset with it's cols attribute set to "50%,50%" at the moment. I have a toggleView method which is called after a click on an element. What I aim to do is to change frameset from displaying cols to rows, again divided 50/50. I have attempted to perform a removeAttribute("cols") on the frameset, while this doe...

How could you implement something like Excel 2007's databars in HTML/CSS/JS?

What I'd like to do is produce an HTML/CSS/JS version of the following. The gridlines and other aspects are not important. It's more of a question how to do the background databars. ...

Thoughts on making a webapp fullscreen in a pop-up

At my company most inventory tracking is done via an ASP.NET web application. The application is poorly conceived, poorly designed, poorly implemented, and somewhat of a hassle for a user to work with. These are things that are my opinion though and management has its own thoughts on the matter. Such luxuries as the browser's back but...