close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

navigating to multiple addresses..

Thread began 11/21/2012 5:29 am by CraigR | Last modified 11/26/2012 11:32 am by CraigR | 2701 views | 16 replies

CraigRBeta Tester

Ok, nearly there I think.

I tried the +loopIndex+ in the brackets for the 3 elements, but this gave a strange result, removing the form altogether and replacing it with a 0.

infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><?php echo str_replace("'", "\'", "<strong>Get Directions From Postal Code:</strong><form onsubmit='return false'><input type='text' name='from' value=''/><input type='button' value='get directions' onclick='addDirections(this.form.elements[0].value, wagmp_map_2_obj.addresses["+loopIndex+"].full,true,wagmp_map_2_obj.obj,wagmp_map_2_obj.icons["+loopIndex+"],wagmp_map_2_obj.points["+loopIndex+"]);' /></form><strong>Address:</strong><br />".$row_rslocations['Address1']  ."<br />".$row_rslocations['City']  ."  ".$row_rslocations['Postcode']  .""); ?></span>',



I then tried using the locationID from the recordset, which works, (but will only work if the numbers increase in such a way as they correspond to the loopindex.)

infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><?php echo str_replace("'", "\'", "<strong>Get Directions From Postal Code:</strong><form onsubmit='return false'><input type='text' name='from' value=''/><input type='button' value='get directions' onclick='addDirections(this.form.elements[0].value, wagmp_map_2_obj.addresses[".($row_rslocations['LocationID']-1)."].full,true,wagmp_map_2_obj.obj,wagmp_map_2_obj.icons[".($row_rslocations['LocationID']-1)."],wagmp_map_2_obj.points[".($row_rslocations['LocationID']-1)."]);' /></form><strong>Address:</strong><br />".$row_rslocations['Address1']  ."<br />".$row_rslocations['City']  ."  ".$row_rslocations['Postcode']  .""); ?></span>',



It would be good if I could generate the element id from the javascript loop rather than the php recordset.

The second issue, is that although the php id's function correctly, the directions are not replaced when a new postcode is entered, they are appended, so i get several journeys, one after the other

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...