Rising Falling Arrow

Discussion in 'Javascript' started by Techhead, Mar 28, 2007.

  1. Techhead

    Techhead Guest

    How can I implement a rising/falling trend arrow based on a number
    that may rise or fall. For example, if the number (variable) is 100
    and changes to 101, the "arrow" changes to "up", if the number goes
    back to 100, the arrow changes to "down". I'm not a statistical guru
    but I am sure there is a definition for this.

    I am getting my number variable from a sql server via a query.
     
    Techhead, Mar 28, 2007
    #1
    1. Advertising

  2. Techhead

    VK Guest

    On Mar 28, 6:57 pm, "Techhead" <> wrote:
    > How can I implement a rising/falling trend arrow based on a number
    > that may rise or fall. For example, if the number (variable) is 100
    > and changes to 101, the "arrow" changes to "up", if the number goes
    > back to 100, the arrow changes to "down". I'm not a statistical guru
    > but I am sure there is a definition for this.
    >
    > I am getting my number variable from a sql server via a query.


    If you want to make it client-side then te simpliest way IMHO is to
    make three small - say 16x16 - gif images:
    1) transparent
    2) arrow up
    3) arrow down

    Then all stock labels are served with transparent gif first and client-
    side you do something like:

    if (oldVal >= newVal) {
    imgObject.src = 'arrowUp.gif';
    }
    else {
    imgObject.src = 'arrowDown.gif';
    }

    Actually such kind of things is more reliable and natural to prepare
    server-side rather than using client-side scripting - IMHO
     
    VK, Mar 28, 2007
    #2
    1. Advertising

  3. Techhead

    McKirahan Guest

    "Techhead" <> wrote in message
    news:...
    > How can I implement a rising/falling trend arrow based on a number
    > that may rise or fall. For example, if the number (variable) is 100
    > and changes to 101, the "arrow" changes to "up", if the number goes
    > back to 100, the arrow changes to "down". I'm not a statistical guru
    > but I am sure there is a definition for this.
    >
    > I am getting my number variable from a sql server via a query.


    Do you mean an image of an up and down arrow?

    Will you be getting two numbers so you cant compare them?

    Tell us more...
     
    McKirahan, Mar 28, 2007
    #3
  4. Techhead

    Evertjan. Guest

    Techhead wrote on 28 mrt 2007 in comp.lang.javascript:

    > How can I implement a rising/falling trend arrow


    The arrow part:

    <http://devrijehuisarts.org/test/jsarrow.asp>
    <http://devrijehuisarts.org/test/jsarrow2.asp>

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Mar 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin

    Rising, falling edge

    ALuPin, Apr 21, 2005, in forum: VHDL
    Replies:
    0
    Views:
    7,064
    ALuPin
    Apr 21, 2005
  2. Sky
    Replies:
    0
    Views:
    370
  3. Anon Anon
    Replies:
    2
    Views:
    1,385
  4. picnanard
    Replies:
    0
    Views:
    618
    picnanard
    Sep 1, 2008
  5. denish
    Replies:
    5
    Views:
    5,832
Loading...

Share This Page