Ebase Technology Forum Index Ebase Technology Forum

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ebase with google maps

 
Post new topic   Reply to topic    Ebase Technology Forum Index -> Extensibility
View previous topic :: View next topic  
Author Message
sid_nadgeri
Ebase User


Joined: 16 Oct 2008
Posts: 11
Location: Mumbai, Currently in Croydon

PostPosted: Tue Jun 01, 2010 4:26 pm    Post subject: Ebase with google maps Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger
Jon
Moderator
Moderator


Joined: 12 Sep 2007
Posts: 11

PostPosted: Wed Jun 02, 2010 9:34 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
sid_nadgeri
Ebase User


Joined: 16 Oct 2008
Posts: 11
Location: Mumbai, Currently in Croydon

PostPosted: Wed Jun 02, 2010 12:43 pm    Post subject: Reply Reply with quote

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
Back to top
View user's profile Send private message Yahoo Messenger
Wai
Moderator
Moderator


Joined: 12 Sep 2007
Posts: 50
Location: Sandy, UK

PostPosted: Wed Jun 02, 2010 2:29 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
sid_nadgeri
Ebase User


Joined: 16 Oct 2008
Posts: 11
Location: Mumbai, Currently in Croydon

PostPosted: Thu Jun 03, 2010 12:50 pm    Post subject: Reply with quote

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

Thanks,
Sid
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ebase Technology Forum Index -> Extensibility All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group