Javascript!

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
Arctic
-


Joined: 24 Sep 2004
Posts: 560

PostPosted: Sat Jun 18, 2005 6:32 pm    Post subject: Javascript! Reply with quote

<script type="text/javascript" language="JavaScript">
<!--
function calculate(form)
{
ai = eval(form.ai_rating.value);
if(ai == "N/A")
{
ai = 0;
}

gameplay = eval(form.gameplay_rating.value);
if(gameplay == "N/A")
{
gameplay = 0;
}

graphics = eval(form.graphics_rating.value);
if(graphics == "N/A")
{
graphics = 0;
}

sp = eval(form.sp_rating.value);
if(sp == "N/A")
{
sp = 0;
}

mp = eval(form.mp_rating.value);
if(mp == "N/A")
{
mp = 0;
}

online = eval(form.online_rating.value);
if(online == "N/A")
{
online = 0;
}

story = eval(form.story_rating.value);
if(story == "N/A")
{
story = 0;
}

form.overall_rating.value = (ai + gameplay + graphics + sp + mp + online + story) / 70 * 100
}
-->
</script>

How do I get it to exclude the certain thing if N/A is picked?
Back to top View user's profile Send private message ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group