473,788 Members | 3,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1616
"Techhead" <jo*********@gm ail.comwrote in message
news:11******** **************@ r56g2000hsd.goo glegroups.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...@gm ail.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.javas cript:
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...@gm ail.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.javas cript 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
2159
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 non-routable listener socket that marshals communications between the non-routable netowrk and the clients out on the routable network. The app runs as a .NET service in Win2K Server. Async
3
1716
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 thing run fine. Anybody have any idea about this!!!
11
2810
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
3793
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 that specifically lists the ID's of the adjacent controls. The second is to somehow put in some navigation information into the ID's themselves and then loop through them on key press to try to calculate which cell to go to next. Which is the...
1
10156
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 Key. The code below shows what I mean. How can I cure this? (excuse me for the line breaks) */
0
2924
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 I intercept the Arrow Keys when holding down the Shift Key? */
9
3829
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 cpu rising to 100% and I reset IIS and submit that page again and same thing happened again, and then reset IIS again and it happened again, the process caused this is dllhost.exe. Thinking about what's the difference this time from what I submitted...
2
10328
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 functionality of Rising Edge D Flip Flop is that whenever a rising edge of CLOCK signal will occur ( Rising Edge : 0 to 1 ) the output will be the similar state of INPUTDATA signal, otherwise (if it will be not a rising edge and CLOCK signal is 0...
4
6283
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 keyboard to move through the cells. I found some code and adapted it, and it works well now. Arrow keys move the cursor exactly to the correct cell. There are two things I can't do which I was hoping you guys would give me some help on. I am a...
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.