javascript

Google Maps API Reverse Lookup Address Details Accuracy

Hi, I am using Google Maps API for reverse lookup of an address, specifically Country, City and ZIP code. The problem I have is that with geocoder when you input a specific lat lng you get a range of results based on the address detail accuracy. For example if you click on the street you get address detail accuracy of 8 and the address l...

JavaScript Math: How do I write this?

In Excel I have: =(((SQRT(40))($E$8/C16))^2)1.1 Which is like: (((SQRT(40)) * (7.695 / 0.200) ) ^2) *1.1; I can't get it working in Javascript! I have: answer = (Math.exp(((Math.sqrt(40)) * (7.695 / 0.200))) *1.1); I am getting something like: 5.265317066795887e+105 When I expect to get something like: 65168 Can anyone help ...

Strange behaviour with range.toString()

I want to get back the text that I select in an element using the Range object provided by Mozilla's flavour of javascript. So I do this: //assume that I'm only using Firefox, and there is just one selection var range = window.getSelection().getRangeAt(0); var rangeText = range.toString(); This works OK when the html of the selected ...

How to know whether the facebook application has been connected

I am trying to implement a facebook application, but i am trying to use the prompt-permission tag but the link not appear and only show the text. The text change to link when I clicked the facebook's CONNECT button. So when a user login through the facebook (not from Connect button), the link won't appear... Is it because the user does...

Access GET directly from JavaScript?

I suppose I could use PHP to access $_GET variables from JavaScript: <script> var to = $_GET['to']; var from = $_GET['from']; </script> <script src="realScript" type="text/javascript"></script> But perhaps it's even simpler. Is there a way to do it directly from JS? ...

Execute JavaScript function with externally loaded link

Hi, I'll admit the title is a bit confusing but it was hard to come up with a better one. Ok, so What I have is 3 pages, first is the main page that the user loads up and the other 2 are ones that are going to be loaded into the main page with jQuery. Here is the JavaScript code on the first page: $(document).ready(function(){ $("#ma...

Why are JS scripts usually place in the header of a document?

Why are JS scripts usually place in the header of a document? Is it required by standards, or is it just a convention with no particular reason? ...

A confusing problem with IE7 and styles being applied

For the life of me, I can not figure out why some styles are not being applied to an unordered list. If you view this site: http://www.alclawyers.com.au/ in Firefox, you will notice there are circles down the bottom of the text that can be clicked to shift to different panels of content. Now, when you visit the same site in IE7, none o...

Am I using onchange incorrectly?

I'm trying to have a value (key) that updates to correspond with a number in a textbox (angle) divided by a value (25). However, for some reason, the changeMe function doesn't seem to be executing. Am I using onchange incorrectly? <script type="text/javascript"> function changeMe(x) { var y=document.getElementById(x).value; y = (y/25);...

Annotate a webpage on the client side

Hi I am trying to develop a firefox add-on which would allow me to highlight a text on the web page (any webpage client side) and then allwo me to write a note and save it. So when i visit the web page next time, if an annotation exists for a webpage it shows up a small Anchor/link next to the text, which on clciking should display the ...

Rounded corners AND shadow applied to one div?

How? Any suggestions besides CSS? I have tried JQuery (dropCurves, shadow, shadedborder, corner osv). ...

Using Jeditable and activating on click

I found this to be almost exactly what I'm trying to do. I'm using Jeditable I can get the default setup to work. I've also been able to get the code in the forum above to work. I believe my problem is that because I'm using a table I need to so something else to select the previous element. Here is my HTML <table> <tr> <t...

Eclipse JavaScript project "was not validated since its include path is incomplete."

I am using Eclipse and would like to start using the JavaScript validation tools which are now available. I think this is version 3.4, but Help|About... doesn't show the version number, only tells me that it's build 20090920-1017. This is a pre-existing EJB/JSP application to which I added the "JavaScript Toolkit" facet. The issue at h...

Performing Inheritance in Javascript

Now while i know that you can not perform inheritance like you would in C# ,but i have seen mentions about it arround the net that it is kind of possible. If its not possible using plain javascript then would it be possible using Ext JS and if so how. ...

Searching for the Ultimate Resizing Textarea

I'm wanting to provide a resizing textarea control for users. I've given this a go and looked at a number of other implementations, but I can't seem to find one that meets all my requirements. Specifically I want a control that: Works in IE6, IE7, IE8 on Windows and Firefox 3 and 3.5 on Windows and OS X when the page is rendered in sta...

How to structure Javascript architecture to compliment a PHP MVC web app?

I am working on a new JavaScript architecture for a web app iteration. The previous iteration had lots of inline code, scattered includes, no directory structure for .js files and everything was in the global namespace. I am aiming to: keep the script includes in the footer, keep everything in an application namespace/object, add organiz...

Stop reloading flash file when using show and hide methods

I have a web page where a flash file is embeded in that.The flash file is having a quiz consist of 4 questions.When user answer the first question the second question will be shown.This flash is embeded in a div called divFlashcontent.Now i want to hide and show the quiz inbetween.Ex: When the user clicks a button("Pause"), i want to hid...

Internet Explorer, Loading Bar, 5.57MB page

I have a sorta unique question. There is a web application which takes 5.57mbs of loading. I want a Loading Bar or Ajax Spinner on there that animates so they know things are progressing along during the ~10-20 seconds load time. Most is images, a lot of JS here too. The problem here is this, Firefox correctly threads everything so ...

QUnitAdaptor for JSTestDriver passing failed test!

Hi all: I have a very strange case here when using QUnitAdaptor to test my QUnit tests. It actually passed a test which is supposed to fail: test("very simple test", function() { var somevar = true; equals(somevar, false, "test"); }); The above test passed when I ran it after capturing browser programmatically. Has anyone experienc...

Support for Raphael Javascript library in Netbeans

According to this blog post, Netbeans's supposed to support Javascript type inference. And Javascript support should be built-in to the Netbeans editor. However when I add an HTML file to a simple Java project, and include the Raphael javascript library using <script src="..."/> it seems that Netbeans does not recognize the library. Even...