The most efficient thing to do would be to write yourself a PHP web page.  PHP is pretty similar in syntax to perl, and isn't too difficult to pickup. PHP is essentially a hybrid between a programming language and HTML. Think of it as a way to programmatically build an HTML page on the fly.    I could share my php code if you like.

If you can't use PHP for some reason, then you really want to build a _javascript_ file instead of a CSS file.  Including a JS file will be both easier and more flexible.

You'd use your favorite scripting language to output a file of valid _javascript_ statements that you can then use in the HTML to display at runtime.  The template file with owfs values you'd generate should be in the same folder as the display page and might look something like:

// 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=""></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/////////////////////////////

-Scott


Rob Conway wrote:

Before my email archives died L, somebody did send me details on how to pass owfs data to a web page.

 

It went like this…

1.   An owfs script writes some structured data into an ascii file, the structure of the line declares a variable with the actual 1wire data next to it. A variable per data point…

2… A web page declares this ascii file as a CSS in the header section, and then somehow a “form control” (contents) is assigned to the variable.  Thus when the web page is called the data is passed from the file to the web page.

 

This seemed a lot simpler than trying to append data directly into the web page.  It seemed simple to construct a small manageable CSS file.

 

Now I’ve tried to search the archives however searching for “CSS” is pointless as I get a gazillion hits !

 

 

Can anybody fill in some missing pieces to the above philosophy…..i.e. How to declare a CSS variable and the CSS structure and then how to use a form (text box) to retrieve the data via assigning that CSS variable..

 

I’ve tried a couple of html forums however its hard to explain real time data display

Cheers

 

rob


------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to