View Single Post
  #3 (permalink)  
Old 09-09-2008, 05:44 AM
Bad Inferno Bad Inferno is offline
Registered User
 
Join Date: Apr 2007
Location: Australia
Posts: 21
I understand CSS is not the answer now... However a work around which I got seems to achieve what I was looking for.. Thanks Scott

// Begin Javascript Include file owValues.js/////////////////////////////
device1 = new Object;
device1.parameter1 = 25;
device1.parameter2 = "some owfs read value";
device1.parameter3 = "some owfs read value";

device2 = new Object;
device2.parameter1 = 59;

device3 = new Object;
device3.parameter1 = 63;
// End Javascript Include file owValues.js/////////////////////////////


To output the owfs read values in your HTML, you'd do something like:

// Begin HTML file display.htm/////////////////////////////
<HTML>
<HEAD>
<SCRIPT language="javascript" src="owValues.js"></SCRIPT>

</HEAD>
<BODY>

<h3>Here are the owfs values</h3>

<SCRIPT language="javascript">
document.write('<p>Device1 Temp: ' + device1.parameter1 + '</p>');
document.write('<p>Device2 Temp: ' + device2.parameter1 + '</p>');
</SCRIPT>
<DIV> some more web content goes here. You can output OWFS data from your include file anywhere you like.</DIV>
<DIV>The memory pages of device1 contents:
<B>
<SCRIPT language="javascript">
document.write(device1.parameter2);
</SCRIPT>
</B>
</DIV>
</BODY>
</HTML>
// End HTML file display.htm/////////////////////////////
Reply With Quote