The Artima Developer Community
Sponsored Link

Java Answers Forum
Math Script Ideas

3 replies on 1 page. Most recent reply: Oct 5, 2003 5:42 PM by J Stevens

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
J Stevens

Posts: 6
Nickname: cryslyn
Registered: Oct, 2003

Math Script Ideas Posted: Oct 3, 2003 6:52 AM
Reply to this message Reply
Advertisement
Here's what I want to do, any suggetions appreciated. I want a script that will perform the following function:

The script must check to see if a "-" sign has been entered on a form, and if so, perform this function;

event.value = a.value - b.value + c.value + d.value

however, if anything else is entered on the form, ie: a "+" or nothing, it will do this:

event.value = a.value + b.value + c.value + d.value

so, a minus, makes it subtract 'b' from 'a', then add 'c' and 'd' to the answer;
if anything else is entered, besides the minus, it will simply add all 4 numbers.

Can someone please help me. I need lots of ideas, so I can try them all. :) Thanks in advance.

ps: I believe the form uses Java 1.5


Clay Dagler

Posts: 21
Nickname: cdagler
Registered: Jul, 2003

Re: Math Script Ideas Posted: Oct 3, 2003 7:29 PM
Reply to this message Reply
Is this a home work problem? I think I might use it in my class.

David

Posts: 150
Nickname: archangel
Registered: Jul, 2003

Re: Math Script Ideas Posted: Oct 4, 2003 11:30 AM
Reply to this message Reply
I think you've had this answered on another forum. It's Javascript in an Adobe document, right?

Oh, and 1.5 isn't released yet.

J Stevens

Posts: 6
Nickname: cryslyn
Registered: Oct, 2003

Re: Math Script Ideas Posted: Oct 5, 2003 5:42 PM
Reply to this message Reply
To answer the two questions, no it is not a homework problem and you can use it in class. Second, yes, I did ask it in a different way, but no good solutions yet. And as far as the version goes, that's what it says in the Adobe file, JavaScript 1.5. That's all I know. J

Flat View: This topic has 3 replies on 1 page
Topic: Struts Validator,Tag libraries!! help needed Previous Topic   Next Topic Topic: how to read thread dumps

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use