RE: [NF] Web sites

Author: john harvey

Posted: 2006-10-23 at 18:05:02

One thing you could do is use text merge to build the static webpages.

Here's a snippet of code that might help. It creates a google pin map, then

builds an html table at the bottom of the page:

* for your test you can try these vars:

m.case="0610000001ME Aggravated Assault 10/01/2006 3500 STRAUSS CT"

m.date=date()

lnrecs=1

SET TEXTMERGE on

SET TEXT TO (lcfile) noshow

\<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

\ "" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

\<html xmlns="" target="_blank">http://www.w3.org/1999/xhtml">

\ <head>

\<img src = "http://maps.google.com/mapfiles/kml/pal4/icon59.png"

style="display:none">

\ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>

\ <title>Google Maps JavaScript API Example</title>

\ <script

src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAkgy8Ufju8M

mwuwcRfunFIhRxNXuhdp4zLubrtrrFj3aUwEnHGBRSXx7OALFgKyta-FLXRvbNmXIQPg"

\ type="text/javascript"></script>

\ <script type="text/javascript">

\

\ //<![CDATA[

\ function load() {

\ if (GBrowserIsCompatible()) {

\ var map = new GMap2(document.getElementById("map"));

\ map.addControl(new GSmallMapControl());

\ map.addControl(new GMapTypeControl());

\ map.setCenter(new GLatLng(<<m.lat>>,<<m.long>>), 13);

\ map.zoomIn() ;

\

\ // Create a base icon for all of our markers that specifies the

\ // shadow, icon dimensions, etc.

\ var baseIcon = new GIcon();

\ // baseIcon.shadow =

"http://www.google.com/intl/en_ALL/mapfiles/shadow50.png";

\ baseIcon.iconSize = new GSize(20, 34);

\ baseIcon.shadowSize = new GSize(37, 34);

\ baseIcon.iconAnchor = new GPoint(9, 34);

\ baseIcon.infoWindowAnchor = new GPoint(9, 2);

\ baseIcon.infoShadowAnchor = new GPoint(18, 25);

\

\ // Creates a marker whose info window displays the letter

corresponding

\ // to the given index.

\ function createMarker(point, index, lctext) {

\ // Create a lettered icon for this point using our icon class

\ var icon = new GIcon(baseIcon);

\ var lcicon =

"http://maps.google.com/mapfiles/kml/pal4/icon59.png"

\ icon.image = lcicon;

\ var marker = new GMarker(point, icon);

\

\ GEvent.addListener(marker, "click", function() {

\ marker.openInfoWindowHtml("<b>" + lctext+ "</b>");

\ });

\ return marker;

\ }

\

\ // Add markers to the map at locations

\ var bounds = map.getBounds();

\ var southWest = bounds.getSouthWest();

\ var northEast = bounds.getNorthEast();

\ var lngSpan = northEast.lng() - southWest.lng();

\ var latSpan = northEast.lat() - southWest.lat();

\ for (var i = 0; i < <<lnrecs+1>>; i++) {

scan

\ var point = new GLatLng(<<lat>>,<<long>>);

m.case=case

lc1=LEFT(m.case,AT(' ',m.case))

m.case=ALLTRIM(m.case)

m.case=STRTRAN(m.case,lc1,'')

lccaseno=UPPER(lc1)

lc4=SUBSTR(m.case,AT(ALLTRIM(STR(YEAR(DATE()))),m.case)+4,55)

m.case=ALLTRIM(STRTRAN(m.case,lc4,''))

lcaddress=UPPER(lc4)

lc3=SUBSTR(m.case,RAT(' ',m.case),55)

m.case=ALLTRIM(STRTRAN(m.case,lc3,''))

lcdate=lc3

lc2=ALLTRIM(STRTRAN(m.case,LEFT(m.case,AT(' ',m.case)),''))

m.case=UPPER(ALLTRIM(STRTRAN(m.case,lc3,'')))

m.case='Case No: '+lccaseno+'<p>'+'Block: '+lcaddress+'<p>'+'Date:

'+lcdate+'<p>'+'Offense: '+m.case

\ var lctext = "<<ALLTRIM(m.case)>>";

\ map.addOverlay(createMarker(point, i,lctext));

endscan

\ }

\ }

\ }

\

\ //]]>

\ </script>

\ </head>

\ <body onload="load()" onunload="GUnload()">

\ <div id="map" style="width: 600px; height: 400px"></div>

loca

\<p>

\<table border=1 bgcolor="white" align="left">

\<tr>

\<th align="left"><<ALLTRIM(TRANSFORM(lnrecs)))>> Cases</th>

scan

\</tr>

\<tr>

IF DATE>DATE()-6

\<td><font color="red"><<case>></font></td>

ELSE

\<td><<PROPER(case)>></td>

endif

endscan

\</font></tr>

\</table>

\ </body>

\</html>

John Harvey

-----Original Message-----

From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf

Of Virgil Bierschwale

Sent: Monday, October 23, 2006 4:22 PM

To: ProFox Email List

Subject: [NF] Web sites

I just spent all day putting together my site at

http://www.bierschwalesolutions.com

Having gone back and verified that each link was working on each page, I

realized there has to be a better way as that was a pain in the ???

How can I develop a static site where the links work on every page without

me having to recreate it everytime I add a new page.

Is this something I need to do in a style sheet ?

Something like a fox program where you say:

do header

do links

text here now

Thanks,

Virgil Bierschwale

Armstrong and Skipper Real Estate

(830) 329-6774 Cell

(830) 864-4726 Home

(830) 864-4799 Fax

http://www.bierschwalesolutions.com

http://www.bierschwale.com

http://www.virgilslist.com

[excessive quoting removed by server]

©2006 john harvey