PDA

View Full Version : Use Cookies Toolkit to store & recall individual Form Entries?


neilo
06-21-2011, 10:21 AM
Hiya,

Hoping to use Cookies Toolkit to store and recall individual form item entries per session so that I can somehow make the Google Maps 'Get Driving Directions' to somehow work dynamically without having to use a database/recordet.

My Google Map page(s) have a simple form, four fields:

Street
City
Post Code
Country (so Google knows where to look)

I am hoping that someone can provide a quick step-by-step guide to commiting each form item entry to a cookie so that I can somehow recall and bind those values dynamically in the Driving Directions (Step 5) of the Map GUI process.

Saving entire form to cookie seems to mean that I can't bind individual fields in GUI. Have spent hours trying to get my head round this, and more hours watching the interactives and reading the pdfs.

At the moment my only option seems to be to pick one address out of the whole of Mediocre Britain in the hope that they might one day want to drive to my client's business premises.

Simple to follow [baby-steps] instructions would be hugely valued. If they work.

Yours densely,

neilo
06-21-2011, 12:31 PM
Ignore this for a bit. I seem to have by-passed the obvious.

Jason Byrnes
06-21-2011, 12:42 PM
have you looked at the "Displaying Form Elements" tutorial in the Solution Recipe section of the Pro Maps support page:
http://www.webassist.com/support/pro-maps-for-google/

neilo
06-21-2011, 02:34 PM
Hi Jason,

Thanks, - yep - have tried that exactly as shown soooooo many times, on two machines, CS4 CS5 CS5.5, ProMaps 1.0.6, ProMaps 1.0.7. Have tried inserting into required page, and into blank pages.

Looks fine in Design view, but previewed in browser, there is no sign of the lower (directions) bit. Just the form and the default map view which is correct.

I have given up on this, so no worries.

neilo
06-21-2011, 03:35 PM
Just for your info, attached is an entirely 'bare-bones', by-the-book page & files zip, the results of which can be seen here:

http://www.thewebsite.co/examples/pro_maps/

Not much to see.

If you enter an address in the form and submit, then check the source, you will see that the 'var fromAddress = {' is populated with the address you entered and all is as it should be. But no signs of any directions area.

Jason Byrnes
06-22-2011, 07:16 AM
Google does not like the starting address you entered.


When I search your starting address:
92 Higher Drive, Purley, Surrey, CR8 2HJ, United Kingdom


through maps.google.com, it comes back as:
92 Higher Dr, Croydon, Greater London CR8 2, UK

If i replace your address in the map js file:
full: '92 Higher Drive, Purley, Surrey, CR8 2HJ, United Kingdom',

with the one from google:
full: '92 Higher Dr, Croydon, Greater London CR8 2, UK',


the directions work.

neilo
06-22-2011, 08:25 AM
Hi Jason,

Yes I finally worked this out in the small hours of this morning.

Google didn't Like 'Drive' (preferring 'Dr'), and I had been given a wrong second part of the postcode.

I should have thought of checking the address out on Google Maps online first, saving myself hours of headache, so mia culpa.

Thanks,

Jason Byrnes
06-22-2011, 08:32 AM
No worries.