javascript

How to keep div focus when the mouse enters a child node

Hey, So I have this page here: http://www.eminentmedia.com/development/powercity/ As you can see when you mouse over the images the div slides up and down to show more information. Unfortunately I have 2 problems that i can't figure out and I've searched but haven't found quite the right answer through google and was hoping someone cou...

How to completely disable all Internet Explorer Script Error dialogs

Can someone plzzzzzz tell me how to disable Internet Explorer Script Error - says: An Error has occured in the script on this page ... Error: Unspecified error ... Please don't Say to Go to Tools -> I.Options -> Advanced ...turning off debugging etc etc.. I have tried all that and this popup dialog still com...

how to clear a textbox with calendar extender in javascript?

i have a textbox associated with a calendar extender and a masked edit extender in a asp.net 3.5 project. i would like to clear the texbox when OnBlur...i have tried using the code below but it not working! any ideas guy? document.getElementById('txtDtTo').value =""; ...

js browser detection for IE

Hello, My question is the folowing Is there a solid javascript code to detect if a browser is IE(I don't care about others) I found some script, but it generates an undefined error in FF. I edited my question because I found some regex serverside solution for this on this forum It's enough for now. thanks, Richard ...

returning functions as string in javascript

hello, I am in the process of writing a javascript object that contains a method that returns the html of a standard form. In this object I also have a method validate(); I'd like the form generated to use validate(); So the typical html of a form with validation would probably look like this: <form id="a" onSubmit="return validate();"...

Transversing the DOM in jQuery

I have a bunch of these little bits of HTML code repeated over and over again: <div class="collapse" id="any_mins"> <fieldset> <legend><img title="Click to expand" class="plus" alt="+" src="" />Heading</legend> <table class="mins_table"> lots of rows and cells go here </table> </fieldset> </div>...

JQuery - AJAX dialog modal, can't hit enter key to submit form

On a website I'm working on, when you click sign on, a jquery dialoge modal pops up, but you have to click on OK to submit the form, you can't just hit enter. I need it to be able to have enter work also. It seems like what I have should work, but it doesn't I'm using jquery-1.3.2.js. I also have a php file with the following piece of...

frame by frame caching

How to cache multiple videos frame by frame ...

*SOLVED NON-PROBLEM* <element>.focus(): how to make it work in both IE6, IE7 and IE8?

EDIT: This turned out to be a local problem in my IE6/7/8 test setup. The problem is a non-issue on a clean default install of IE, no matter what version. You can stop reading now. :) I'm writing a rich web application where I display a popup panel containing a simple text input field. I need to focus this text field immediately, so the...

Google code is high above me - can anybody help a Javascript n00b?

ok, I have been looking into google maps for 2 days now when I found this beautiful sample from google engineer Roman Nurik: shit! only 1 link allowed, lol. The source code is available here: link text I am a casual developer at beginners level in javascript (usually C,C++C#) and I would be very greatful if somebody would explain the m...

how can i start ajax push website (activemq or cometd or sth else)?

Hello, I want to start an application which will use ajax push, however the web server should be configured properly and i don't know how to start on server side components. I wanted to start with dojo's cometd and then read some blogs saying that activeMQ is older and flag carrier on ajax push thing, but there was also another blog sa...

How can I recreate the ImageKit Picture Taker?

Hi, I'm trying to create a tool for jQuery which crops images. I know there is already a load of already. The difference with the one i'm trying to make is that i'd like it to act like the Picture Taker interface found in many mac applications like iChat and Adium. I'm stuck completly on how to do it. Can anyone give me any ideas? Pictu...

Using the JQuery Ajax function to Return 2 Sets of Data

I'm using the JQuery AJAX function to deliver data to a PHP doc. Currently, the AJAX success function returns HTML which gets added to the html page. My goal is for the success function to return a second/different piece of data that can be used as a JavaScript variable. How can this be done? Update The question was answered correct...

jQuery advice: How can I improve this function for scrolling elements into view?

I've created a function that scrolls a given child element into view within its parent. It goes as follows: function keepScrolledOver( elem ) { frame = elem.parent(); var scrollPos = frame.scrollTop(); var offset = elem.attr( "offsetTop" ); // If the element is scrolled too high... if( offset < scrollPos ) { frame.scrollTop( ...

What exactly can an IFrame do with the top.Location object (cross-domain)?

There is a very particular edge case in cross-domain policies regarding the window.top.Location object... Let's say I have IFrame A , in domain www.xxx.com, living inside a page in domain www.aaa.com. The page inside the IFrame can: Compare window.top.location to window.location (to detect whether it's being framed) Call window.top...

jQuery question: Does using .remove() also properly remove children?

Not that it matters strictly, and maybe I just don't yet fully understand how the DOM works by asking this, but I'm just trying to anticipate if there is some kind of memory leak potential here. If I remove an element that has children, event listeners, etc., do those get cleaned up as well? Or would I be wise to implement some kind of...

Setting a watch expression in Firebug: ReferenceError - s is not defined

I'm trying to understand how to use firebug to debug my Javascript. So I have the HTML listed below. And I want to set a watch expression on the var 's'. I went to the Script tab of Firebug and opened the Watch pane and entered s into the area that says "New watch expression". I get an error: ReferenceError: s is not defined Why? ...

Constructors in Javascript objects

Can Javascript classes/objects have constructors and how are they created? Any examples? ...

Creating an array of other objects in javascript?

Is something like this possible: function FooClass() { var barsArray=new Array(); var index=0; function addBar() { barsArray[index]=new BarClass(index); } } function BarClass() { var myIndex; function BarClass(index) { myIndex=index; } } ...

Is it a bad idea to leave firebug "console.log" calls in your producton JavaScript code?

I have a bunch of console.log calls in my JavaScript. Should I comment them out before I deploy to production? I'd like to just leave them there so I don't have to go to the trouble of removing the comments later on if I need to do any more debugging. Is this a bad idea? ...