Sorry, This Is Driving Me Nuts...

May 29, 2006

I have this very easy task to accomplish: block clicks on a whole page after
posting to the server to prevent impatient users from clicking many times
and causing problems to the serverside-code.

I actually could do it in IE using this technique:

....
function DisableIEControls() {
try {
document.body.style.cursor = "wait";
document.attachEvent("onclick", function(){return false;});
} catch (e) {}
}

window.attachEvent('onbeforeunload',function(){Dis ableIEControls()});
....

This works fine in IE, now can someone help me writing the same for
non-Microsoft browsers...

I tried almost all but to no avail... clicks are always "sent" to server
side...

View 2 Replies


ADVERTISEMENT

Driving Distance V3 API?

Jun 19, 2010

I've used Brian Crays driving distance calculator on a site, however the calculations are not accurate for full addresses. I realise the v2 google maps api is now depreciated, my question is, if I upgrade to v3, is there more accurate calculations of distance and if so, does anyone have an example of calculating the distance between two points with the new api?

or does anyone know how to get more accurate results with his code?

View 1 Replies View Related

Google Maps API / Compare Driving Distances Without Displaying Locations

Sep 18, 2009

I'm trying to make something a lot like a store locator where a user types in their address of origin and submits, then the script compares the driving distances between their entered address and the 4 destination locations that I will store in an array once the page loads.It's kind of hard to describe. I have a form working to do the distance and driving directions once I know which destination will be chosen.That seems to be working just fine. The problem is that I just can't get anything working that will compare the distance between the origin and each of the options before choosing and displaying directions to the nearest destination. My ultimate goal is to update the list of <options> with PHP and maybe MySQL - though I really don't need this to be large-scale. Then, after the user inputs a starting address if they choose a specific location from the dropdown it will give those directions, otherwise (if the "choose closest location" option is still active) then I will run a comparison of driving distances for each option's address value and store them to an array. Once all locations are read and tested for driving distance I want to take the closest location set that option as selected, and then run the call for driving directions as usual.

I know how to pull the option values, how to set and unset the "selected" attribute, and how to check to see if distances need to be compared. I can figure out how to do just about everything I need EXCEPT for getting the google maps API to play along. I've tried so many dead-end ideas that I have just reset my map code to square one. Any ideas for a script piece to run that will return only the driving distance for a list of locations?I'm going cross-eyed trying to get this working. Does anyone have any ideas for a code blurb to tie this all together? I think everything else should work once I get through the distance iterations but I'm useless with the google maps API...

View 3 Replies View Related

Unable To Steal Bars Of Gold By Loading Them Into Mini Coopers And Driving Away.<p>?

Dec 4, 2011

I am still trying to figure this one out. Would you look at this code and tell me where I am wrong?

Code:
<html>
<head>

[code]...

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved