ISaGRAF WinCE ViewPAC User Manual , V.1.6 , 1/2017 by ICP DAS
5-15
B.
To post by buttons
function ON_(form_obj, obj)
{
flag = confirm("turn ON ?");
if(flag)
{
obj.value=1;
if(GetUserID(form_obj)==true) form_obj.submit();
}
}
function OFF_(form_obj, obj)
{
flag = confirm("turn OFF ?");
if(flag)
{
obj.value=0;
if(GetUserID(form_obj)==true) form_obj.submit();
}
}
function refresh_data()
{
B2.src = "img/big_Tcircle_red" + boolean_val[2] + ".jpg" ;
}
…
<body onLoad="init()">
…
<div style="position: absolute; width: 56px; height:40px; z-index: 5; left: 82px; top: 69px" >
<img name="B2" src="img/big_Tcircle_red0.jpg">
</div>
<div style="position:absolute; left:85px; top:124px; width:42px; height:27px;">
<input type="button" value="ON" style="cursor:hand" onClick="
ON_(form_B2, form_B2.B2)
">
<form name="form_B2" method="post" action="./main.dll">
<input name="BEGIN" type="hidden" value="">
<input name="B2" type="hidden" value="1">
<input name="END" type="hidden" value="">
</form>
</div>
<div style="position:absolute; left:85px; top:166px; width:47px; height:31px">
<input type="button" value="OFF" style="cursor:hand" onClick="
OFF_(form_B2, form_B2.B2)
">
</div>
…
</body>
Demo example: vphmi_02 and vphmi_05
Display the current boolean image.
In this example,
0: “img/big_Tcircle_red0.jpg” ,
1: “img/ big_Tcircle_red1.jpg”
“OFF_” function is used for posting Boolean value as
“False” to the controller .
“ON_” function is used for posting Boolean value as
“True” to the controller .
The layout (or location) of the image object “B2” is
defined here by the “<div” and “</div>” tags.
A button to call ON_( ). First parameter is the name of the form. Here is “form_B2”
The second is the name of the “<input>” inside the form. Here is “form_B2.B2”
Name of “<input>” inside the form. Here is “B2”. Because it is inside “form_B2”,
then must use the name of “form_B2.B2” to identify it.
A button to call OFF_( ). First parameter is the name of the form. Here is “form_B2”
The second is the name of the “<input>” inside the form. Here is “form_B2.B2”
Содержание ISaGRAF VP-23W7
Страница 44: ......
Страница 118: ......
Страница 134: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS 9 2 On line help of ICP DAS add on functions function blocks ...
Страница 176: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 16 Appendix C Hardware Interface Dimension ...
Страница 177: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 17 VP 23W7 23W6 Unit mm ...
Страница 178: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 18 VP 25W7 25W6 Unit mm ...
Страница 179: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 19 ...
Страница 180: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 20 VP 41x7 41x6 Unit mm ...
Страница 185: ...ISaGRAF WinCE ViewPAC User Manual V 1 6 1 2017 by ICP DAS Ap 25 ...