javascript

Is there a way to access an iframe's window object from the canvas in FBJS? (facebook)

From the facebook canvas, I need to be able to access an iframe window. Normally you could do this with window.frames, but FJBS doesn't seem to allow access to the window object. Has anyone figured out how to access window objects? ...

How can I do AJAX-y conditional show/hide form fields in Rails?

I'd like to show or hide a few fields in a form in Rails, depending on the state of a select field in the form. I don't (currently) need a second database lookup for the fields, so I'm trying to keep it all confined to the view. I have the outline sketched out, but I'm having some trouble with the implementation details. My initial tho...

UrlEncode - Javascript vs. C#

I have a URL which requires some parameters. The values of those parameters can be accented characters, so I absolutely need to UrlEncode them. Strangely, I see a difference between the behavior or Javascript and .NET. Let's pretend I try to UrlEncode the word "éléphant". In JavaScript (according to this WebSite: http://www.albionresear...

How to trigger dialog with JS before leaving current page

When a user have changed something in a form, then clicks on any link that will direct him to another page, I'd like to trigger a popup with a "Would you like to Save before leaving?" option. How can I do this? ...

Listen to events: in HTML from .NET

Hi guys, Let's say that in the HTML with the help of an UpdatePanel I have the "loading" animated gif running while ASP.NET is processing data from a webservice. I'm just wondering if there is a way to implement an Event in the .NET code that can be listen from the HTML code, like: I'm requesting Persons data from a WebService, one by...

Handling events from HTML anchor tags in ExtJS

I have a large application built in ExtJS and am looking for the best way to handle custom events from anywhere in the application. For example I might want to put an anchor tag in some text in the application which will open a custom component in my app. At the moment I listen to clicks on the body and if the target has a css class appl...

What (free) web development IDEs do people use?

I'm after a free (and Free) lightweight IDE at least on Windows, and preferably cross-platform as well, which handles: XHTML, CSS and Javascript (maybe even jQuery..!) syntax highlighting FTP deployment Version control integration (CVS, SVN, Git, whatever) What've people found to work? EDIT: I've tried a few of these, and have chose...

More efficent method of styling alternating blocks of table rows with jQuery?

Doing odd/even styling with jQuery is pretty easy: $(function() { $(".oddeven tbody tr:odd").addClass("odd"); $(".oddeven tbody tr:even").addClass("even"); }); Now I came across an interesitng problem today. What if you want to style alternating groups of elements? For example, alternating blocks of 3. Longhand this can be done...

Finding all classes that match a pattern in an HTML document?

I got to thinking today: what is the best way of getting a distinct (ie no repeats) list of classes used in a document that (preferably) match a pattern (regular expression) pattern or (alternatively) start with a certain character sequence? JQuery can be used for this or just straight Javascript. Now it should obviously cater for all ...

How to access objects/arrays defined in JavaScript from Java applets.

Using LiveConnect getMember(String) method of a window JSObject, a Java object of type "Object" is returned but I don't find the expected members defined on it. Neither can I cast it to a JSObject to continue using the getMember(). Accessing DOM nodes and elements (DOM Objects) works as expected. ...

IE Input type text weird behavior.

Hi, I have a google suggest like utility on my page. It automatically fills a value in one of input type text box. In IE, after the value is being filled. It doesnt allow mouse to click in between and curor jumps to the end always. Also with the left and right keys,the cursor jumps to the beginning. What's the cause. Thanks <div id='in...

Is jQuery UI tabs broken in rc6?

I've been using jQuery UI v1.6rc2 for a while, and wanted to upgrade to 1.6rc6 to see that they haven't made any breaking changes. It seems they have; all of my tabs stop working whenever I switch to rc6. There seems to be two things wrong. First, the manual advocates using the following: $('#container').tabs(); However, with rc2 I'v...

De-cluttering ASP.NET javascript

Hi, I'm just getting into ASP.NET Been avoiding it for years as I'm a desktop application advocate. Anyway, I was wondering if there's a way to stop the generated html being so cluttered with javascript. Is there a way to make the generated script go into a referenced js file rather that inline with the page. ...

How to use JSON with Jquery?

I'm working at an app which would make a POST ajax request to a PHP script on my server. The script would query the database and return a row of records, as an array. (One array for each row, containing elements such as id, title, etc). I then want to use json_encode() to encode this array, and pass it back to the javascript which will u...

C# httpwebrequest and javascript

Hi all. I am using C# HttpWebRequest to get some data of a webpage. The problem is that some of the data is updated using javascript/ajax after the page is loaded and I am not getting it in the response string. Is there a way to have the webrequest wait untill all the scripts in the page have finished executing? Thanks Amit ...

Is it possible to have a secure web form without an https server ?

I have a website hosted on a provider which doesn't give me with a fixed ip adress so I cannot use https. I would like to edit some page using a webform but in a secure fashion. The client would be an iphone type device, so a java or flash applet would be out of the question. Is there a way to still have a secure connection between th...

jQuery: Unbind event handlers to bind them again later

Hi all, Does anybody know how to unbind set of event handlers, but memorize them in order to bind them again later? Any suggestions? ...

IE6 performance with CSS expressions

We are developing a web application that will be sold to many clients. There is already one client (a bank) which has decided that it will buy the product once it is ready. Unfortunately due to some miscommunication it came out rather late that the only browser they use is IE6. The application was already started with the thought in mind...

Has anyone been able to edit text in an OpenWYSIWYG control dynamically?

Like the question says has anyone been able to take a OpenWYSIWYG control and change its contents dynamically with JavaScript? It's hard because it takes your textarea and transforms it into a WYSIWYG editor by making the textarea invisible and inserting some kind of iframe and uses that as the editor. I've tried code like this but fai...

How to transfer java array to javaScript array using jsp?

Hello all, I have a list of strings on my server which I am trying to get to the client in the form of an array. The code I am attempting to use is the following: Within the jsp I have a List<String> columns. I am attempting the following code: <%int j = 0; %> for(var i = 0; i < <%=columns.size()%>; i++) {   colArray[i] = "<%=column...