Results 1 to 2 of 2
- 04-30-2008, 03:55 AM #1
Member
- Join Date
- Apr 2008
- Posts
- 1
- Rep Power
- 0
Using functions that return values?
Hi, I am supposed to write a program that returns quality points based on a grade. I have been given the table that includes the form, however the form needs to have a function and it calls the function from a separete javascript file. The program is supposed to return a number between 1 and 4 dependong on the grade. If the grade is between 90-100 the the number would be 4. If the grade were between 80-89 the the returned number would be 3. Between 70-79 = 2 and between 60-69 = 1.
Here is the skeleton i wrote based on what I've tried to learn about this. This skeleton is inside the separate file.
<script type="text/javascript">
function qualityPoints (average)
{
return ;
}
<script type="text/javascript">
document.write(qualityPoints())
</script>
Hopefully I did not confuse anyone... but I am confused myself. :o
- 04-30-2008, 04:07 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You are talking about JavaScript, not Java. Those are completely two different languages pal.
Similar Threads
-
Functions in jsp
By samson in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 03-25-2009, 10:04 PM -
Calculating trigonometric functions
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:56 PM -
Calculating hyperbolic functions
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:55 PM -
Accessing boolean Values of another values in one class.
By a_iyer20 in forum Advanced JavaReplies: 4Last Post: 04-15-2008, 01:04 PM -
how to return values from hashmap
By oregon in forum New To JavaReplies: 2Last Post: 08-01-2007, 04:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks