The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> If statement to show/hide one of two tables
zarcher
post Mar 27 2012, 03:10 PM
Post #1





Group: Members
Posts: 3
Joined: 27-March 12
Member No.: 16,802



This is a custom balloon for Google Maps.

Depending on the values of the cells, I want just one of these tables to appear. If there is a value for {Last Reading}, I want the first table to appear. Otherwise, the second table should appear. Please help.

<div style='font-family: sans-serif'>
<center>

<table border="1">
<tr>
<td><b>Instrument ID</b></td>
<td>{Instrument ID}</td>
<td><b>Last Reading</b></td>
<td>{Last Reading}</td>
</tr>
</table>
</div>

</center>
<b>Notes:</b> {Notes}

<div style='font-family: sans-serif'>
<table border="1">
<tr>
<td><b>Ring #</b></td>
<td>{Instrument ID}</td>
<td><b>Tgt Face Pressure</b></td>
<td>{Target Face Pressure}</td>
</tr>

</table>
</div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Darin McGrew
post Mar 27 2012, 04:08 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,021
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



How/where are {Instrument ID} and {Last Reading} and {Target Face Pressure} defined? Is this for Tumblr?


--------------------
Darin McGrew
WDG Member since 1998
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
zarcher
post Mar 27 2012, 04:18 PM
Post #3





Group: Members
Posts: 3
Joined: 27-March 12
Member No.: 16,802



QUOTE(Darin McGrew @ Mar 27 2012, 04:08 PM) *

How/where are {Instrument ID} and {Last Reading} and {Target Face Pressure} defined? Is this for Tumblr?



They come from a Google Fusion Table.

Open this code in a web browser to see the map. Click on any of the points to see the tables. The second table applies only to the white and gray points. The rest should use the first table.

<html>
<body>
<center>
<iframe width="1000" height="600" scrolling="no" src="https://www.google.com/fusiontables/embedviz?viz=MAP&q=select+col7+from+3349076+&h=false&lat=47.613742432089424&lng=-122.32453068355596&z=19&t=1&l=col7"></iframe>
</center>
</body>
<html>

There is not an option for using more than one info window layout so I'm trying to manipulate the code to appear differently based on the data.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 30th October 2014 - 12:30 PM