Nov 04
Janis Rough Web Viewer Encoding issue, google maps, php, javascirpt
Nov 04, 2009; 08:46
Janis Rough
Web Viewer Encoding issue, google maps, php, javascirpt
I'm having an ongoing issue with the Web Viewer :-) I'd like to resolve. I can send you the view in the WV layout. You can see the encoding in the wv layout window, but I can't send an attachment to the list.
I have this javascript form in the web viewer:
-----js_form_gt---------
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   <title>untitled</title>
   <meta name="generator" content="TextMate http://macromates.com/">
   <meta name="author" content="jrough">
   <!-- Date: 2009-11-02 -->
   <script type ="text/javascript">
   var q ="#q";
   alert(document.forms['pgform'].elements['q'].value);
  Â
   </script>
   </head>
   <body onload="
     var frm = document.forms['pgform'];
     frm.elements['q'].value = q;
     document.forms['pgform'].submit();
   ">
   <form name="pgform" action="http://janisrough.dyndns.biz/phooglemapPC.php" method="post">
   <input type ="hidden" name ="q" value="q"/>
   <input type="submit" value="show map"/>
   </form>
   </body>
   </html>
directly in the web viewer I have a calc that substitutes the #q for a serialized & encoded address list.
----calc in wv-------
"data:text/html"& Substitute(address::js_form_gt;"#q";address:serializedLIst)
---------
This should work. I have 2 test scripts and a test file. One I encode the serialized list [var q] and one script I don't encode the serialized list. Custom functions cfURLEncode, cfSerializeData, Trim4.
I create a ¶ delimited URLencoded address list and trimmed trailing and ending ¶'s.
Script 1:I know the web viewer is encoding the javascript form, so i tried not encoding the serialized list . When I run that script, the form gets cut off in the web viewer output starting in the middle of the address list and gets cut off. I'm pretty sure it needs to be urlEncoded:
-------gets cut off and stops processing javascript----------
Lancaster, CA, 93534";i:1;s:34:"3537 3rd St, Ridgefield, WA, 98642";i:2;s:40:"931 Alabama St, san francisco, CA, 94110";}";
   alert(document.forms['pgform'].elements['q'].value);
  Â
   </script>
   </head>
   <body onload="
     var frm = document.forms['pgform'];
     frm.elements['q'].value = q;
     document.forms['pgform'].submit();
   ">
   <form name="pgform" action="http://janisrough.dyndns.biz/phooglemapPC.php" method="post">
   <input type ="hidden" name ="q" value="q"/>
   <input type="submit" value="show map"/>
   </form>
   </body>
   </html>
Script 2----------
When I run it with the address list encoded the form doesn't process and I get a blank in the WEb viewer but in layout mode I can see my form that is encoded and the encoded address list in the web viewer. As I said above I can send you the pdf picture. It looks okay to me.
This is a direct POST in the Web Viewer on a PC running FM9 or greater.
It only works on the PC to do a direct post and it has to be 9 or greater.
I have this form running already on a Mac but it is a GET to a POST conversion so its different in that the url is sent to a local path as a GET then converted to a POST. I would love to get the PC version running.
I have this all set up on a test FM 9 Server. If you want to log in as guest and help me figure out this issue you can have the php page so you can print a google map yourself.   fmnet:/janisrough.dyndns.biz/map_4.fp7
I can't see why this doesn't work.Â
hellpp!
Janis L. Rough
C:415.550..8550
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/FileMaker/Browse/
Manage your subscription: http://www.ListSearch.com/FileMaker/
Nov 05
Winfried Huslik Re: Web Viewer Encoding issue, google maps, php, javascirpt
Nov 05, 2009; 04:44
Winfried Huslik
Re: Web Viewer Encoding issue, google maps, php, javascirpt
Nov 05
Janis Rough Re: Web Viewer Encoding issue, google maps, php, javascirpt
Nov 05, 2009; 08:06
Janis Rough
Re: Web Viewer Encoding issue, google maps, php, javascirpt
Nov 06
Janis Rough Re: Web Viewer Encoding issue, google maps, php, javascirpt
Nov 06, 2009; 07:48
Janis Rough
Re: Web Viewer Encoding issue, google maps, php, javascirpt