Jump to content

[SOLVED] Results of live search


robbb99

Recommended Posts

Hi there,

 

I have a working 'live search' function on my website which uses Google Maps API, please take a quick look (robmaps.co.uk/Floor_plans/Chadwick/index1.html). Currently, after typing something in the search box and clicking on the link, a new web page opens. However, i would like the Google 'infowindows' to open, just like they do with my 'selection box' option using the GEvent.trigger markers function.

 

For the live search to work, I used this excellent tutorial which shows the relevant HTML, PHP and Javascript code needed: w3schools.com/php/php_ajax_livesearch.asp?output=print.

 

Part of the PHP is:

    $hint="<a href='" . 
    $z->item(0)->childNodes->item(0)->nodeValue . 
    "' target='_blank'>" 

 

The $z represents a field called 'type' in my database which relates to the floor plan room numbers and obviously I need to replace the <a href "" target=blank> with an event that will open the infowindow in the same page. I can't seem to get my head around the solution to this ??? and i'm finding it especially difficult because im not familiar with PHP.

 

Thanks for looking and for any suggestions that you may have.

Rob

Link to comment
https://forums.phpfreaks.com/topic/152807-solved-results-of-live-search/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.