J
JRough
I have a Filemaker desktop application that sends a string of
serialized addresses as a GET parameter to a google map
(googlemap.php). There are some reasons I need to convert the GET to
a POST, one of which is there are sometimes 200 separate addresses and
in IE there is a limit. So I designed this local HTML page as a proxy
of sorts to convert the GET to a POST before sending it to the
googelmap.php page to display as addresses on google map. I copied
a Javascript routine from the web that parses the addresses and
assigns it to a variable (pgformproxy.js) . I'm not getting some
output so can someone tell me how to debug this before posting it to
php or if I'm going in the right direction? I don't know if I called
the function right or if the page post is right. Thanks very much,
Janis
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitonal.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP Proxy Convert Get to Post</title>
<script type="text/javascript" src="pgformproxy.js"></script>
</head>
<body onload='addrList=document.getURLParam(addr)'>
pgpost_url = file://localhost/Users/jlrough/Sites/workspace/soliant/googlemap.php">
<form name = "pgform_post" method="post" action=pgpost_url>
<TEXTAREA NAME=Address rows="10" cols="10">
value = addrList
</TEXTAREA>
<input
type="hidden"
name = "PagePost"
value ="">
</form>
</body>
</html>
--------pgformproxy.js-------
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf
("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return unescape(strReturn);
}
serialized addresses as a GET parameter to a google map
(googlemap.php). There are some reasons I need to convert the GET to
a POST, one of which is there are sometimes 200 separate addresses and
in IE there is a limit. So I designed this local HTML page as a proxy
of sorts to convert the GET to a POST before sending it to the
googelmap.php page to display as addresses on google map. I copied
a Javascript routine from the web that parses the addresses and
assigns it to a variable (pgformproxy.js) . I'm not getting some
output so can someone tell me how to debug this before posting it to
php or if I'm going in the right direction? I don't know if I called
the function right or if the page post is right. Thanks very much,
Janis
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitonal.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTTP Proxy Convert Get to Post</title>
<script type="text/javascript" src="pgformproxy.js"></script>
</head>
<body onload='addrList=document.getURLParam(addr)'>
pgpost_url = file://localhost/Users/jlrough/Sites/workspace/soliant/googlemap.php">
<form name = "pgform_post" method="post" action=pgpost_url>
<TEXTAREA NAME=Address rows="10" cols="10">
value = addrList
</TEXTAREA>
<input
type="hidden"
name = "PagePost"
value ="">
</form>
</body>
</html>
--------pgformproxy.js-------
function getURLParam(strParamName){
var strReturn = "";
var strHref = window.location.href;
if ( strHref.indexOf("?") > -1 ){
var strQueryString = strHref.substr(strHref.indexOf
("?")).toLowerCase();
var aQueryString = strQueryString.split("&");
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){
if (
aQueryString[iParam].indexOf(strParamName.toLowerCase() + "=") > -1 ){
var aParam = aQueryString[iParam].split("=");
strReturn = aParam[1];
break;
}
}
}
return unescape(strReturn);
}