Experimental Physics and Industrial Control System
|
Hi,
What is the type and the value of "values" when you are attempting
this operation? The "values" variable is either a scalar or an array
depending on the number of items returned by the PV. Then you need to
consider the native type of the PV. If the native type is a number
then you need to convert it to a string in order to use the "indexOf"
method. I suspect that your PV may be returning a number which is why
the indexOf method fails. You might try looking in your web browser's
JavaScript console log to see if there are any errors.
To test for an array, check whether values.length is defined.
To get the type, use the "typeof" method as in "typeof(values)".
best regards,
tom
On Dec 11, 2008, at 8:18 PM, Bao Chunlei wrote:
Hello all,
I just use WebCA to read pv value.But when I do some change to
the value,I get nothing.If anyone has the answer,please tell me.
the code:
function handleMonitor( userInfo, pvName, values, status, severity,
timestamp ) {
userInfo.innerHTML = values;
}
only this,is run correct.
but
function handleMonitor( userInfo, pvName, values, status,
severity, timestamp ) {
temp=values;
index=0;
index=temp.indexOf(".");
userInfo.innerHTML = temp.substr(0,index+4);
}
I get nothing value。
Thanks all
Baochunlei
Control Group,IHEP
- References:
- Question about WebCA Bao Chunlei
- Navigate by Date:
- Prev:
Re: lockset question Benjamin Franksen
- Next:
Re: EDM On Focus Related Displays Won't Close John Sinclair
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Question about WebCA Bao Chunlei
- Next:
Problems getting edm functional on NetBSD David Dudley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|