Announcement

Collapse
No announcement yet.

Interval

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Interval

    If the interval is other than sec/min/hour, I would like to solve following, how do I achieve it?

    ninterval=getInterval();
    xinterval=8*ninterval; <-----------------------this works for sec/min/h
    if (ninterval="D" ) {xinterval="W"}; <-----------------------this does not work
    if (ninterval="W" ) {xinterval="M"}; <-----------------------this does not work
    if (ninterval="M" ) {xinterval="Y"}; <-----------------------this does not work

    Can some one modify to make it work?
    Thanx.

  • #2
    kpmci
    It is not working because in each conditional statement you are using the assignment operator = instead of the comparison operator ==. Once you fix that it will work
    For more information review the Beginner Tutorial 2: Commonly used Core JavaScript which is in the EFS KnowledgeBase in the Help Guides and Tutorials folder
    Alex


    Originally posted by kpmci View Post
    If the interval is other than sec/min/hour, I would like to solve following, how do I achieve it?

    ninterval=getInterval();
    xinterval=8*ninterval; <-----------------------this works for sec/min/h
    if (ninterval="D" ) {xinterval="W"}; <-----------------------this does not work
    if (ninterval="W" ) {xinterval="M"}; <-----------------------this does not work
    if (ninterval="M" ) {xinterval="Y"}; <-----------------------this does not work

    Can some one modify to make it work?
    Thanx.

    Comment


    • #3
      How can I change this isDaily || isweekly to 240 or 60 minutes here please. I am not sure how to use this xinterval.

      if (a&gt;b) &amp;&amp; (isDaily() ) {drawtext ...... }

      Comment

      Working...
      X