Ebase with google maps

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

Ebase with google maps

#1

Postby sid_nadgeri » Tue Jun 01, 2010 4:26 pm

Hi,

I am trying to develop demo of Ebase with google maps.

By clicking on google maps the javascript will populate the geocode data in form fields. I am well aware on google maps side what needs to be done.

Just confused on Ebase side, is there anyway to pupulate the form fields in javascript?

If anybody already done integration please help me out.

Thanks,
Sid
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed Jun 02, 2010 9:34 am

Sid,

You can set the special system variables $USERVAR1, 2 and 3 by using the setFieldValueExternal Javascript method. Search on setFieldValueExternal in the online documentation and you should see an example. This documentation also shows you how to submit the Ebase form if you want to do this.

Regards
Jon
0 x

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

Reply

#3

Postby sid_nadgeri » Wed Jun 02, 2010 12:43 pm

Hi,

Thanks for coming back to me quickly.

Here are the steps which i followed.

1. Created simple ebase form with gmap (label) and latitude and longitude as form fields.

2. Added div tag to gmap to place the google map.

3. Html++ aaded script to load google map and setting the value of $USERVAR1 on the click event of the map.

Now i dont have any other way to copy the value set in $USERVAR1 to latitude and longitude fields, i tried to use the control field but it will put value after i user externalSubmit() funtion and which will take me on next page.

Summary - When click event is fired on map i am executing the setting $USERVAR1 value and then i need to passon this value to form fields.

Regards,
Sid
0 x

User avatar
Wai
Moderator
Moderator
Posts: 165
Joined: Wed Sep 12, 2007 9:04 am
Location: Sandy, UK
Contact:

#4

Postby Wai » Wed Jun 02, 2010 2:29 pm

The $USERVAR variables will require the form to be submitted.

If you just wanted to display the values in some fields for the user, what you could do is create your own HTML input fields (with an ID) in an Ebase Label field. These will really only bwe for display purposes.

You will then have access to the input field from javascript using getElementByID.

You would still use the $USERVAR variables to submit the values back to the form and set it to actual Ebase form fields.

Hope that helps.
0 x

sid_nadgeri
Ebase User
Posts: 11
Joined: Thu Oct 16, 2008 11:33 am
Location: Mumbai, Currently in Croydon

#5

Postby sid_nadgeri » Thu Jun 03, 2010 12:50 pm

I have follwed the step as you mentioned and it works fine.

Thanks,
Sid
0 x


Who is online

Users browsing this forum: No registered users and 98 guests