Hello,
In my application I listen to the Google Maps API 'bounds_changed' event to send an ajax request to update some div on the webpage depending on the new boundaries of the map:
google.maps.event.addListener(map, 'bounds_changed', function() {
// here goes an ajax call
}
The event 'bounds_changed' is fired with a high frequency...
How can i make it nicer?
var month = new Array();
month['01']='Jan';
month['02']='Feb';
month['03']='Mar';
etc. Itd be nice to do it like:
var months = new Array(['01','Jan'],['02','Feb'],['03','Mar']);
For example. anyway like that to simplify it?
...
hey guys,
i'm a little confused.
i want to actually reload the same page and fetch a div with a certain id from it. so i'm trying to reload a part of website into the same part of the website. ;) i know it sounds weird.
somehow i don't get what i'm doing wrong or better how i have to do it.
var $sv = $('#server_view');
$sv.load('/serv...
I'm using a lightbox for image viewing and I just have to use rel="lightbox" inside <a>. The problem is that my site has AJAX for every link, so I coded
$('a').live('click', function() {
$('#content').load($(this).attr('href'));
return false;
});
This way, every link turns to be an AJAX request. What is pissing me off is that ...
Hi,
Using jquery,
The following line works i.e. radioClicks function gets called.
$("input:[name='"+54464+"']").bind( "click", radioClicks );
but this one doesn't:
$("input:[name='"+options.rowId+"']").bind( "click", radioClicks );
and yes, you have guessed it, options.rowId = 54464 (at least in the debugger) .
What am I missi...
I'm trying both greasemonkey and google's chrome extensions. And found that chrome seems using the same names of api as GM. (Seem having the same bug...) Just wondering whether greasemonkey is already a google's chrome extension?
...
In the example below what's the simplest addContent function that will put some content into the child div?
<div>
<a href="javascript:addContent();">My Link</a>
<div/>
</div>
Clicking the link should result in:
<div>
<a href="javascript:addContent();">My Link</a>
<div>Added Content</div>
</div>
...
hi guys,
i have like
http://www.mydomain.com/hello/you
with top.location.host, i can get "http://www.mydomain.com"
with window.location.href i can get "http://www.mydomain.com/hello/you"
is there a chance to get just "/hello/you" ???
...
I've been looking at JavaScriptMVC, and I'm pretty interested in the idea. I'm wondering, though, if there are any ORM solutions for such an architecture. It seems like you will end up having to write two data access layers, one server side to fetch items from the database and one on the client side to retrieve items via AJAX.
My ques...
Disclaimer: I'm fairly new to AJAX!
I've looked around, and I'm not sure which method to use to load javascript using ajax.
I'm using ajax to request pages that each require their own 6-10 short methods. In total there will be maybe 5-6 of these pages, so an approximate total of 35+ methods.
I would prefer to access necessary javascri...
octopusList = {"first": ["red", "white"],
"second": ["green", "blue", "red"],
"third": ["green", "blue", "red"]}
squidList = ["first", "second", "third"]
for i in range(1):
squid = random.choice(squidList)
octopus = random.choice(octopusList[squid])
print squid + " " + octopus
Can anyone help me write ...
Is it possible to get pixel level data of an image view using Titanium Mobile on Android/iPhone?
...
Is there another a way to concatenate a '#' character like I'm doing below?
radioButtonID = '#' + radioButtonID;
...
Talk is cheap; I'd rather show the code:
//global var
var siblings = [];
var rand = new Date().getTime();
siblings.push('uin_' + rand);
alert(siblings['uin_' + rand]); // undefined
Why undefined? What I basically want to achieve is to have a global object that would be a storage where info about other objects get saved. But get back ...
Is it possible to subclass and inherit from javascript Arrays?
I'd like to have my own custom Array object that has all the features of an Array, but contains additional properties. I'd use myobj instanceof CustomArray to perform specific operations if the instance is my CustomArray.
After attempting to subclass and running into some ...
The goal is for an Acrobat form to fill a date field ("MeetingDate") with Today's date when the user opens it. If the user saves the form as is and opens it a few days later, the old date should still be there, not replaced by the current date. If the user changes date in the field, that date should be saved and should not be replaced wh...
I want to filter the content in a simile Timeline display on some field other than description.Is it possible?
...
I have a table containing multiple addresses, including their Lat/Long coordinates, and I want to place many of these markers onto a google map at once, using asp.net webforms and Google Maps Javascript API V3.
The tutorials show how to add one marker:
http://code.google.com/apis/maps/documentation/javascript/overlays.html#Markers
var...
How to identify browser tab closing using javascript or jquery? I have to give a confirmation message when user click on the browser close button. If user press yes button I have to load another page on the same tab. if press cancel. then close the tab. any body knows the scripts for this functionality. Please help me :(
...
Hello friends,
var product="";
for (var i=0; i<10; i++)
{
product+="<div align='center' width='88' id='"+i+"'>"+i+"</div>";
$("#"+i).hover(function()
{
alert(i);
});
}
product variable is able to generate the desired output with the div ids ,but when I m moving my mouseover those divs, that mouseover function(f...