473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Rising Falling Arrow

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.

Mar 28 '07 #1
4 1596
"Techhead" <jo*********@gmail.comwrote in message
news:11**********************@r56g2000hsd.googlegr oups.com...
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...
Mar 28 '07 #2
VK
On Mar 28, 6:57 pm, "Techhead" <jorgenso...@gmail.comwrote:
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

Mar 28 '07 #3
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)
Mar 28 '07 #4
VK said the following on 3/28/2007 12:07 PM:
On Mar 28, 6:57 pm, "Techhead" <jorgenso...@gmail.comwrote:
>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
That would actually not work when oldVal == newVal as the arrow should
stay precisely whatever it was to start with.

if (oldVal newVal){}
if (oldVal < newVal){}

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Morgan Leppink | last post by:
Hi all - We have been developing a complex TCP socket communication app that is responsible for keeping numerous connections open to clients on routable IPs. The app receives request on a...
3
by: Saeid | last post by:
Hello the web site is working fine on localhost, but after deployment, no button is rising postback event but it's check for validation when I used IE. But when I test using FireFox agent every...
11
by: Rlrcstr | last post by:
How can you detect when an arrow key gets pressed? Doesn't seem to trigger a KeyPress or KeyDown event. Thanks. Jerry
2
by: PJ6 | last post by:
When I hit an arrow key, I want to be able to change the focus from cell to cell just like in Excel. I see two ways of doing this. First, emitting in script a function call in each cell on key down...
1
by: Martijn Mulder | last post by:
/* I have problems detecting the Arrow Keys on a User Control. A control derived from System.Windows.Forms.Control neglects 'bare' Arrow Keys but does react on the combination <Altor <Ctrl+ Arrow...
0
by: Martijn Mulder | last post by:
/* I override IsInputKey() to direct the Arrow Keys (Cursor Keys) to my custom System.Windows.Forms.Control. But, holding down the Shift-Key prevents the Arrow Keys from coming through. How can...
9
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Today, an interesting thing happened to me. When I am doing the test of an asp program, one of the pages(which I submitted several ten times before, no problem at all) caused our server...
2
by: as | last post by:
Hi folks, am a newbie in C++ world. Normally I use matlab more often. But right now I want to create a Rising Edge D Flip-Flop model which has two Digital inputs, i.e. INPUTDATA and a CLOCK. The...
4
by: beary | last post by:
Hi Being tested using FF 3 on WAMP server. I have spent a number of hours trying to figure this out myself. I have a html form using table cells and had a request to enable the arrow keys on a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.