Forum Moderators: coopster
<a href="http://mapsite.com/map.aspx?Address=whatever&City=Someplace">map link</a>
This works in the sense that the new search page appears with the form fields filled in; but how do I get it to automatically do the search?
<a href="http://mapsite.com/map.aspx?Address=whatever&City=Someplace">map link</a>
Aren't you in the wrong forum? ;)
You need to tell the script that it should be performing a search. You can use an if statement like this:
<?php
if($_GET['action'] == 'search')
{
// Do your search
}
else
{
// Show the search form
}
?>
And your link would be something like this:
<a href="http://example.com/map.aspx?action=search&Address=whatever&City=Someplace">map link</a>
This is part of a serverside php page.
Sorry to not explain clearly - This is part of a real estate site and I need the variables of address and city to pass to this map page and automatically display the correct location on the resulting map.
My code fills in the fields, but will not activate the submit (Search) button
global $lang;
$map_string = "?Name=$address&Location=$city&onload=document.frm1.submit()";
if ($url_only == 'no') {
$display = "<a href=\"http://www.somesite.com/map/Default.aspx$map_string\" >$lang[map_link]</a>";
} else {
$display = "http://somesite.com/$map_string";
[edited by: dreamcatcher at 12:16 pm (utc) on Aug. 28, 2006]
[edit reason]
[1][edit reason] Generalized url [/edit] [/edit][/1]