javascript

Need help Reverse Geocoding to append message to GLatLng coordinate.

My code: http://jsbin.com/epuxu With help from SO, I managed to get addresses geocoded and their according pins placed on the map. The problem is that I can't select the coordinates in order to append a #message div to it on the map because I don't have the coordinates anymore. I suspect I'm doing something wrong in this section: /* M...

how to get the image inserted from the tinymce editor ?

Hi, I am trying to use the tinymce text editor, but am not being able to get the contents of the editor using jQuery , and also if I use the simple post method to get the value I get the text, but am not getting the image? The code I tried using jQuery was: $(document).ready(function() { $("#save").click(function() { $....

jQuery double animation using the jquery easing plugin

Hi guys, I want to implement something like this page does: link text Look at the Clicker box. The box has two animations going on. One for the easeInQuad, then the other animation is for the easeInOutSine. How can I implement something like that in my own function? $(function() { var iH = window.innerHeight + 80; var posi...

How to update the right span?

On my forum-based website, I have a link below every post for reporting spam or abuse. Whenever this link is clicked, a web service is called on the server, when the call returns, the span containing the link (see the code below) is updated with something like 'Post reported' or if an error occurs it shows something like 'An error occurr...

jQuery: Need some help.. The callback function of .animate isn't working

Hi, I want to have some kind of bounce effect in my animation plugin but it isn't working. The callback isn't called at all: $(function() { var offset = $("#first").offset(); var position = $(window).scrollTop(); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll>position) { $("b...

Are there any Ajax(Prototype or JQuery Plugin) sample for stackoverflow-like voting?

any good ajax samples for implementing voting similar to the up and down buttons of stackoverflow.com ...

Dojo: Get ID of inlineEditBox on OnChange

I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture the onchange event and send a key/value post to a php page (to set into a database). The value is the new value just submitted, available from e.target.value. That's easy. I'd like the key value to be the id of the inlineEditBox widget. How can I access...

Making a truly destop like table grid (how to show enough empty rows to fill the height of table grid)

I'm really concerned about the aesthetic aspect of my web app and that's why I'm asking this sort of a silly question. Forgive me in advance if you think it's not that much a big deal. I'm building a desktop like web app and using jqGrid awesome plugin to show some tabular data. In desktop applications like iTunes, the table has enough...

HTML Classes WITH IDs

I'm a little confused about HTML classes and IDs, as I'd like to use them BOTH to describe an HTML element. Is this valid and supported by most browsers? The motivation for me to use both is this: I have a CSS style that I would like applied to multiple elements. I have some AJAX and Javascript that will manipulate those same elements...

How can I add a hover class to an element?

On my CSS I have: li.sort:hover {color: #F00;} All my LI elements under the 'sort' class function properly when the DOM is ready. If I create a new LI element (using mootools el.addClass(classname)) I can set the base class, but can't figure out how to add a "hover" class to it. Any ideas? d. ...

Get entire document HTML as string

Is there a way in JS to get the entire HTML within the html tags, as a string? document.documentElement.?? ...

Ensure javascript badge / widget html is not changed

One of my clients wants to distribute a javascript widget that people can put on their websites. However he wants to ensure that the backlink is left intact (for SEO purposes and part of the price of using the widget). So the javascript he's going to distribute might look like this: <script id="my-script" src="http://example.com/widget-...

Is there a search engine for web sites html/js code?

Do you know of a search engine that looks in web sites code, not only text? for example to find all the websites that use Jquery I may search for 'jquery-1.3.2.min.js' .... (I know the question is not directly a programming question but the answer can be very helpful to programmers) ...

Good way to estimate available browser area

I'm trying to figure out the best way to estimate the maximum size of the browser viewable area. i.e. the screen dimensions less toolbars, bookmarks, etc. Obviously it wont be perfect for cases when the window isn't maximized and due to the fact that people do actually use different browsers - I'm just looking for a good estimate here. ...

How to improve performance of Jquery autocomplete

Hi, i was planning to use jquery autocomplete for a site and have implemented a test version. Im now using an ajax call to retrieve a new list of strings for every character input. The problem is that it gets rather slow, 1.5s before the new list is populated. What is the best way to make autocomplete fast? Im using cakephp and just doi...

Problems with Cache in Firefox when i upload my app to web server

Hi there, Can anyone help? I have been designing a site using Javascript but the rest of the html content is static ie. images etc When i load my page in Firefox i have to clear the cache.. I remember a long time ago there was something you could add to the html to force a reload. My question is, is this a good thing? I presume it ca...

Div not properly hiding in IE

I've got few divs on my website - on the load I want some of them to be hidden, some shown. I am hiding the ones I don't want like this: $(".divToHide").hide(); It works well in Chrome, Firefox, IE8 an Opera... It doesn't in IE6 (I haven't tested on previous version yet...) - when I load the page all the divs are hidden properly. When...

Getting associated img from HTML area

Hello, There are two img elements that use the same map with one area. Now, we bind e.g. a click event handler to the area element. Is it possible to determine from the event handler which image instance has been clicked? ...

jQuery Accordion open collapsed

Hi, using jquery v1.3.2 and jQuery UI 1.7.1 I have 1 tab control with 3 tabs in it. Each tab contains 1 accordion control. $(document).ready(function() { $('#acc1').accordion({ collapsible: true, autoHeight: false }); $('#acc1').accordion({ collapsible: true, autoHeight: false }); $('#acc1').accordion({ collapsible: true, autoHe...

Forcing page refresh on click of back button

I've 2 asp.net pages..page A and page B. On clicking a link on page A, user gets redirected to page B.When on page B, if user clicks browser's back button,I need to forcefully invoke page refresh of page A. How do i achieve this functionality? Note:Code needs to be compatible across different browsers...ie IE, firefox, opera, etc Thank...