If it's not being loaded via AJAX, you're going to have to send it to the server and use a server side language (php, python, etc.) to add it into maps. I suppose you could also save it to a cookie if you REALLY wanted to and then check for it on the "maps" page. You could also send it via GET (modify the link, if there is one) and then use JS to parse it but if it's a form field that's being POSTed, server side language it is.
Edit: Well, without knowing more, this is the best I can do for you.
<script type="text/javascript">
function buildValue(sValue) {
if (/^\s*$/.test(sValue)) { return(null); }
if (/^(true|false)$/i.test(sValue)) { return(sValue.toLowerCase() === "true"); }
if (isFinite(sValue)) { return(parseFloat(sValue)); }
if (isFinite(Date.parse(sValue))) { return(new Date(sValue)); }
return(sValue);
}
function getVars() {
var oGetVars = {}
if (window.location.search.length > 1) {
var iCouple, aCouples = window.location.search.substr(1).split("&");
for (var iCouplId = 0; iCouplId < aCouples.length; iCouplId++) {
iCouple = aCouples[iCouplId].split("=");
oGetVars[unescape(iCouple[0])] = iCouple.length > 1 ? buildValue(unescape(iCouple[1])) : null;
}
}
return oGetVars;
}
$(function() {
// The name of the parameter we're interested in
var param = "postalCode";
// Gets the params from the URL
getParams = getVars();
// If the parameter we want is in the URL AND the #from element is found...
if (getParams[param] && $("#from").length) {
// Set the value of the #from element to the value of the parameter
$("#from").val(getParams[param])
}
// Store the postalBtn in a variable for easy access
var postalBtn = $("postalCodeBtn");
// If the postalBtn is on this page
if (postalBtn.length) {
// Create a flag to track modification of anchor
var modifiedAnchor = false
// Adds the GET parameter to the parent anchor on button click
postalBtn.click(function() {
// In case the user gets click happy
if (modifiedAnchor) return;
// Get the parent anchor DOM element
var anchor = $(this).parent('a')[0]
// Append the GET parameter to the anchor's href
// (this assumes the anchor HREF doesn't have GET parameters already)
anchor.href += "?" + param + "=" + encodeURIComponent($("#form1").val())
// Set our modifiedAnchor flag to true
modifiedAnchor = true
}
}
})
</script>
mapsopen from a link withindetail(or vice versa)? Or are they just two totally separate pages?