[Geomoose-users] Button in Geomoose

Dan Little danlittle at yahoo.com
Thu May 15 10:26:35 EDT 2008


Hey Jay,

I've ran into this before with different browsers, occasionally they don't take well to the addition of "script" tags in the document after it's loaded.

In the config file there is a "CUSTOM_SCRIPTS" array which lists javascript files that will be loaded on startup.  (I think this is fully working, it was being used at Saint Paul.)  

So I'd do something like this.

create a file called "maplegrove.js" which contains your function (which I assume you later want to do more complex things).

maplegrove.js.
--------------------
function alertSomeStuff(msg) {
    alert('This is your message:' + msg);
}

The next thing I would make sure you do is when defining the button to make sure you use one of two conventions.

<!--- browsers sometimes get picky about onClick versus onclick, so try to use the lower-case only version -->
<button onclick="alertSomeStuff('[PARCEL_ID]')">My Button</button>

or...

<!-- With inputs don't forget the ending "/>" -->
<input onclick="alertSomeStuff('[PARCEL_ID]')" value="My button value"/>

-Duck


----- Original Message ----
From: Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: geomoose-developers at lists.sourceforge.net; geomoose-users at lists.sourceforge.net
Sent: Thursday, May 15, 2008 9:13:29 AM
Subject: [Geomoose-users] Button in Geomoose

 
I am trying this:
 
This is on my Identify_Parcels.html
 
The button shows up in the tab after you do the idntify but
nothing happens when I click the actual button
 
Any thoughts?
 
 
 
<tr>
<td colspan="2"><b>Parcels
Layer</b></td>
</tr>
<tr>
<td align="right">PID:</td>
<td>[PID]</td>
</tr>
<tr>
<td align="right">Address:</td>
<td>[ADDRESS]</td>
</tr>
<tr>
<td align="right">Assessing
Sketches:</td>
<td><a
href="pdf\Assessing_Sketches\[SKETCHES]"
target="_blank">[SKETCHES]</a></td>      
</tr>
 
 
<script language="javascript"
type="text/javascript">
function showAlert() {
 alert('This is an alert message!');
}
</script>
 
<p><input type="button" value="Click
here" onClick="showAlert();"></p>


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20080515/285475b8/attachment.html


More information about the Geomoose-users mailing list