Code: Alles auswählen
Ich bin grad verzweifelt dran, beim Koordinatensuchen gleich den Ort mit ins profile_add_body zu geben.
Ich hab dies einmal folgendermassen versucht:
function refresh_place(place)
{
separator_coord=place.indexOf("_");
separator_location=place.indexOf("@");
longitude=place.substr(0,separator_coord);
latitude=place.substring(separator_coord+1,separator_location);
user_location=place.substr(separator_location+1,100);
opener.document.forms['user'].longitude.value = longitude;
opener.document.forms['user'].latitude.value = latitude;
[b]opener.document.forms['user'].use = location;[/b]
if (opener.document.forms['user'].location) {
if (opener.document.forms['user'].location.value == "") {
opener.document.forms['user'].location.value = user_location;
}
}
opener.focus();
window.close();
}

Hier die map_search.tpl vereinfacht:
Code: Alles auswählen
<form method="post" name="search_place" action="{S_SEARCH_ACTION}">
{L_COUNTRY} <select name="country">
<option value="{search_enabled.country.ID}" {search_enabled.country.SELECTED}>{search_enabled.country.NAME}</option>
</select>{L_LOCATION} <input type="text" name="search_place" value="{PLACE}" class="post" />
<input type="submit" name="search" value="{L_SEARCH}" class="liteoption" />
{L_UPDATE_PLACE}<select name="place_list">{S_PLACE_OPTIONS}</select>
<input type="submit" class="liteoption" onClick="refresh_place(this.form.place_list.options[this.form.place_list.selectedIndex].value);return false;" name="use" value="{L_SELECT}" />
</form>