Click here to Skip to main content
15,914,394 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionJavascript/ASP/SQL Pin
Paul Hayman2-Oct-10 20:59
Paul Hayman2-Oct-10 20:59 
AnswerRe: Javascript/ASP/SQL Pin
NeverHeardOfMe3-Oct-10 4:41
NeverHeardOfMe3-Oct-10 4:41 
GeneralRe: Javascript/ASP/SQL Pin
Paul Hayman3-Oct-10 5:22
Paul Hayman3-Oct-10 5:22 
GeneralRe: Javascript/ASP/SQL (edit) Pin
NeverHeardOfMe3-Oct-10 5:42
NeverHeardOfMe3-Oct-10 5:42 
GeneralHere's a bit of old code I dug up... Pin
NeverHeardOfMe3-Oct-10 5:59
NeverHeardOfMe3-Oct-10 5:59 
GeneralRe: Here's a bit of old code I dug up... Pin
Paul Hayman3-Oct-10 8:01
Paul Hayman3-Oct-10 8:01 
GeneralRe: Here's a bit of old code I dug up... Pin
NeverHeardOfMe3-Oct-10 10:34
NeverHeardOfMe3-Oct-10 10:34 
Questionfind the mistake Pin
yumss1-Oct-10 1:22
yumss1-Oct-10 1:22 
i want to show the percentage..but its not working plz tell the mistake





<html>
<head>
<script type="text/javascript">
function marksheet(sub1,sub2,sub3,sub4,sub5)
{
var sub_marks=parseInt(sub1)+parseInt(sub2)+parseInt(sub3)+parseInt(sub4)+parseInt(sub5);
var percentage=(sub_marks/500)*100;
return sub_marks;


if (percentage >= 50 && percentage <= 59)
{
document.write("You have got "C" Grade");
}

else if (percentage >= 60 && percentage <= 69)
{
document.write("You have got "B" Grade");
}

else if (percentage >= 70 && percentage <= 79)
{
document.write("You have got "A" Grade");
}

else (percentage >= 80 && percentage <= 100)
{
document.write("You have got "A+" Grade");
}
}
</script>
</head>

<body>
<script type="text/javascript">
var biology=prompt("Please enter marks of BIOLOGY", "");
var chemistry=prompt("Please enter marks of CHEMISTRY", "");
var pak_studies=prompt("Please enter marks of PAKISTAN STUDIES", "");
var sindhi=prompt("Please enter marks of SINDHI","");
var english=prompt("Please enter marks of ENGLISH","");

document.write("Total Marks Obtained Out Of 500 are: " + marksheet(biology,chemistry,pak_studies,sindhi,english));

</script>

</body>
</html>
AnswerRe: find the mistake Pin
Pete O'Hanlon1-Oct-10 1:46
mvePete O'Hanlon1-Oct-10 1:46 
GeneralRe: find the mistake Pin
NeverHeardOfMe1-Oct-10 3:20
NeverHeardOfMe1-Oct-10 3:20 
AnswerRe: find the mistake Pin
Stryder_11-Oct-10 3:25
Stryder_11-Oct-10 3:25 
AnswerRe: find the mistake Pin
W Balboos, GHB6-Oct-10 10:02
W Balboos, GHB6-Oct-10 10:02 
Questionbrowser display problem Pin
annie_bel29-Sep-10 23:32
annie_bel29-Sep-10 23:32 
AnswerRe: browser display problem Pin
Gerben Jongerius30-Sep-10 2:24
Gerben Jongerius30-Sep-10 2:24 
Questionadd new cell by pressing tab button Pin
annie_bel29-Sep-10 0:20
annie_bel29-Sep-10 0:20 
AnswerRe: add new cell by pressing tab button Pin
Pete O'Hanlon29-Sep-10 1:10
mvePete O'Hanlon29-Sep-10 1:10 
GeneralRe: add new cell by pressing tab button Pin
annie_bel29-Sep-10 1:30
annie_bel29-Sep-10 1:30 
Questionwindow.status Pin
hotthoughtguy28-Sep-10 6:31
hotthoughtguy28-Sep-10 6:31 
AnswerRe: window.status Pin
hotthoughtguy28-Sep-10 6:32
hotthoughtguy28-Sep-10 6:32 
AnswerRe: window.status Pin
Dr.Walt Fair, PE28-Sep-10 9:36
professionalDr.Walt Fair, PE28-Sep-10 9:36 
GeneralRe: window.status Pin
jimbo809830-Sep-10 3:34
jimbo809830-Sep-10 3:34 
AnswerRe: window.status Pin
Sunasara Imdadhusen21-Oct-10 2:34
professionalSunasara Imdadhusen21-Oct-10 2:34 
Questionis there any mistake in code Pin
hotthoughtguy28-Sep-10 4:02
hotthoughtguy28-Sep-10 4:02 
AnswerRe: is there any mistake in code Pin
NeverHeardOfMe28-Sep-10 4:44
NeverHeardOfMe28-Sep-10 4:44 
AnswerRe: is there any mistake in code Pin
Richard MacCutchan28-Sep-10 4:46
mveRichard MacCutchan28-Sep-10 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.