Thanks very much for your reply.
I understand the logic in what you have said, but i'm still struggling
to get it to work. Based on my interpretation of your idea the PHP
should look like this (sorry to post the code):
if (strlen($q) > 0)
{
$hint="";
for($i=0; $i<($x->length); $i++)
{
$y=$x->item($i)->getElementsByTagName('title');
$z=$x->item($i)->getElementsByTagName('url');
if ($y->item(0)->nodeType==1)
{
//find a link matching the search text
if (stristr($y->item(0)->childNodes->item(0)->nodeValue,$q))
{
if ($hint=="")
{
$i = ($z->item(0)->childNodes->item(0)->nodeValue) - 101;
$link = "javascript:GEvent.trigger(gmarkers[" . $i . "],'click')";
$hint = "<a href='" . $link . "'>";
$y->item(0)->childNodes->item(0)->nodeValue . "</a>";
}
else
{
$i = ($z->item(0)->childNodes->item(0)->nodeValue) - 101;
$link = "javascript:GEvent.trigger(gmarkers[" . $i . "],'click')";
$hint=$hint . "<br /><a href='" . $link . "'>";
$y->item(0)->childNodes->item(0)->nodeValue . "</a>";
}
}
}
}
}
With the above code however, the search autocomplete stops working and
when a valid name is entered the page refreshes and nothing happens.
What exactly is it that I am doing wrong?
For reference, this is what my XML looks like:http://www.robmaps.co.uk/
Floor_plans/Chadwick/links2.xml
and this is the php (before any adjustments):http://www.robmaps.co.uk/
php.jpg
Thanks,
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---