javascript

Javascript Object Properties go to undefined after ajax request returns

if you have an object and set a property for it, you can access that property in a function called on that object. but if you call a function and do an ajax request such that a different function is called from onreadystatechange, that secondary response function does not have access to the property. Thats a little confusing so see what ...

Problems with JQuery Galleria and IE7

I have a problem that I can't figure out what to do next. I have a website using JQuery Galleeria in an HTML page and 10 pictures autoplay scrolling at the top of the page. It is using the Classic theme and is very basic functionality. I tested it on my local IIS server and on an internal build server in IE7, Chrome, Opera, Firefox and...

Looking for share tools like mashable

http://mashable.com/2010/06/17/world-cup-apps-blackberry/ See the toolbar on the left with share options? I like that! It floats when you scroll, pretty nice. Does anyone think that would be hard to implement, or more importantly, has anyone already done it? I dont really want to store any information in my local DB if I dont have to....

jquery ui - making dialogs more "dynamic" ?

Hello, I have a page that uses multiple dialogs for different things. Some dialogs may have buttons that others do not while other may need to be a different height than another... All of them have a set of params that will not change. My question, can I have a default like: $('.someElement').dialog({ width: 999, show: 'slide', ...

Jquery Find an XML element based on the value of one of it's children

I'm working on a simple XML phonebook app to learn JQuery, and I can't figure out how to do something like this: When the user enters the first name of a contact in a textbox I want to find the entire record of that person. The XML looks like this: <phonebook> <person> <number> 555-5555</number> <first_name>Evelyn</first_name> ...

Creating a grid overlay over image.

Hi everybody, I made a script (using mootools library) that is supposed to overlay an image with a table grid and when each grid cell is clicked/dragged over its background color changes 'highlighting' the cell. Current code creates a table and positions it over the element (el, image in this case). Table was used since I am planning t...

Client-side or server-side processing?

So, I'm new to dynamic web design (my sites have been mostly static with some PHP), and I'm trying to learn the latest technologies in web development (which seems to be AJAX), and I was wondering, if you're transferring a lot of data, is it better to construct the page on the server and "push" it to the user, or is it better to "pull" t...

Cursor/Caret position cannot be set for ContentEditable after changing parent elements position

Hello, I am developing a webpage editor tool which is based around using an iframe to load the page into, and setting various defined elements in that page as "contenteditable" to allow text to be entered/changed. My editor UI has a "fullscreen mode" option which allows the editor iframe to take up the entire width/height of the browser...

call a java function when we press browser close button

how we can call a java function when we press browser close button...mins when when we close the browser... ...

JSON Parse Date Formats?

Am I correct in assuming that I have to MANUALLY convert Json-encoded date strings to date objects in my client code? Coming from C#, I took for granted that this was happening automatically, but I guess that was .NET. Is there a built in mechanism for getting native javascript types from a Json string (for dates, ints, etc.)? Thank...

onchange event and auto grow textbox

i have made auto grow textarea.it's working fine but when copying and pasting using right click it's not working properly.if i use onchange event in this situation it won't work either because to fire this event we need press enter or tab. please help me to solve this problem ...

NodeJS and node-mongodb-native

Just getting started with node, and trying to get the mongo driver to work. I've got my connection set up, and oddly I can insert things just fine, however calling find on a collection produces craziness. var db = new mongo.Db('things', new mongo.Server('192.168.2.6',mongo.Connection.DEFAULT_PORT, {}), {}); db.open(function(err, db) {...

javascript error: variable is not defined

to is not defined [Break on this error] setTimeout('updateChat(from, to)', 1); I'm getting this error... I'm using Firebug to test and this comes up in the Console. The error corresponds to line 71 of chat.js and the whole function that wraps this line is: function updateChat(from, to) { $.ajax({ type: "POST", ur...

Dynamically bind argument and default value to existing function in Javascript

Let's suppose you have some function someFunc() already defined in javascript, that may or may not have its own argument set defined. Is it possible to write another function to add a required argument and set that argument to a default for someFunc()? Something like: var someFunc = function(arg1, arg2 ...){ Do stuff...} var addRequired...

Does submit() function has a callback?

Hi, I have this code, and a file upload form which is submited to a frame: setMyCookie('name','value_1'); $('.myform').submit(); setMyCookie('name','value_2'); Problem: Webkit browsers seem to update 'MyCookie' with 'value_2' before the form gets submited, or in the exact moment it is being submited, so wrong cookie value is sent with...

Does anyone know how to debug javascript in IE 7 and IE 8 using Visual Studio Express 2010 without having to install Frontpage Server extensions?

I want to use visual studio express to debug Javascript in IE7/8, but it seem to require that frontpage server extensions to be installed on the page. ...

How do you select a specific child div with jQuery?

How do you select a div which is a child of the current $(this)? I have many divs with the class row, in each of which I have a hidden div called form_explanation. I want to show() the div form_explanation when the row is onClick-ed. Thanks! ...

Is there an Javascript event for when a the page is pushed into the background?

I remember having used such an event, but I can't remember the name. The specific task I'm trying to accomplish is to stop my slideshow when the browser window isn't in the foreground. I'm fading the different images with jQuery, which uses quite some CPU power. Is there an event that tells me, when the user switches to another applica...

Use Javascript variable in PHP

I have seen some answers to this question in previous posts, but no one has given a real working example, just psuedo code. Has anyone ever done this before? Basically, what i have is a variable in javascript (jquery), and i want to use this variable to drive a query (for an overlay window) i am going to run in php. From what i have...

How to overlay a div (or any element) over a table row (tr)?

I'd like to overlay a div (or any element that'll work) over a table row (tr tag) that happens to have more than one column. I have tried a few methods, which don't seem to work. I've posted my current code below. I do get an overlay, but not directly over just the row. I tried setting the overlay top to $divBottom.css('top'), but th...