3 messages in com.googlegroups.opensocial-orkut[orkut-developer] Re: orkut inserts e...
FromSent OnAttachments
joachim23 Jul 2008 11:45 
Jason25 Jul 2008 16:57 
joachim28 Jul 2008 01:35 
Subject:[orkut-developer] Re: orkut inserts element in form
From:Jason (apij@google.com)
Date:07/25/2008 04:57:52 PM
List:com.googlegroups.opensocial-orkut

Hi Joachim. This seems like rather odd behavior that I haven't heard about until now. Can you provide a shortened snippet of code (just a couple of forms and the JavaScript that alerts this inserted element) so I can verify and debug the problem?

On Jul 23, 11:46 am, joachim <joac@zeitspuren.com> wrote:

Hi,

I have a couple of hidden forms on the main page of my application. Randomly one of them is choosen in order to display something on the google map.

I discovered that the code choosing the form was not working anymore and decided to make a few tests.The code is rather simple. It does the following: index = Math.random();         index *= document.forms.length;         index = Math.ceil(index);         var latitude = parseFloat(document.forms[index].elements[0].value);         var longitude = parseFloat(document.forms[index].elements[1].value);         var zoom = parseFloat(document.forms[index].elements[2].value);         var context = document.forms[index].elements[3].value;         var contextId = document.forms[index].elements[4].value;         $mapName.setCenter(new GLatLng(latitude, longitude), zoom); etc.

When I looked further where the problem might be, in included one alert statement: alert(document.forms[index].elements[0].value);

The alert displayed a string consisting of letters and digits and not the latitude value I exspected there to be.

Is this opensocial standard or orkut specific?