Http Server Functions/ Web Pages | FP |
|
|
Please note that the string at DT600 needs to be initialized by the PLC program before data can be stored there. Also see second note in "Notes on Strings", Defining Input Fields for PLC Data on HTML Pages (see "Defining Input Fields for PLC Data on HTML Pages" on page 87).
7.1.14 Automatic Page Reload upon Submitting PLC DataIf the html file "s_m_done.htm" is uploaded to the FP
Example 1: Automatic refresh of an html page after sending PLC data
Enter the following lines in the file "s_m_done.htm":
<html><head><title>DONE</title></head><body> <script language="JavaScript"> opener.location.reload(true); window.close(); </script></body></html>
Comments:
•This script also automatically closes the default window OK or DONE
•Find a copy of this file in \\Example4\http in your installation directory
•Using this file you can execute Java Script applications after sending PLC data
•The file "s_m_done.htm" may not contain PLC data fields, e.g. {DT100_6_d}
•Restart the IEC Configurator after you have modified the file "s_m_done.htm". (When modifying other htm files the unit does not have to be restarted.)
Example 2: Automatic refresh of an html page after sending PLC data but without closing the OK window automatically
Using this script you have to click [OK] to close the OK window
<html><head><title>DONE</title></head><body>
<p align="center"><font face="Arial"><strong><big>FP
</strong><small>Data values transfered to PLC.</small></font></p> <form><div align="center"><center><p>
<input type="button" value="OK" + " onClick="self.close()"></p> </center></div></form>
94