Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008, 04:55 AM
Member
 
Join Date: Apr 2008
Posts: 1
Megapixelz is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-30-2008, 05:07 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,042
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
You are talking about JavaScript, not Java. Those are completely two different languages pal.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
(Close on September 4, 2008)

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating trigonometric functions Java Tip java.lang 0 04-16-2008 11:56 PM
Calculating hyperbolic functions Java Tip java.lang 0 04-16-2008 11:55 PM
Accessing boolean Values of another values in one class. a_iyer20 Advanced Java 4 04-15-2008 02:04 PM
how to return values from hashmap oregon New To Java 2 08-01-2007 05:56 PM
Functions in jsp samson JavaServer Pages (JSP) and JSTL 1 04-02-2007 04:29 PM


All times are GMT +3. The time now is 09:44 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org