ir's not whts wrong i need help making a script i tryed to start it and it was just out of my reach top do. but i need someone to help or to make it for me.
gmmmg1 < gmmmg1%40yahoo.com">gmmmg1
yahoo.com> wrote: what is the wrong in this program
pleas replay
<html xmlns = "http://www.w3.org/1999/xhtml">
<head> <title> test </title>
<script type = "text/javascript">
onerror=handleErr
function handleErr(msg,url,l)
{
txt="There was an error on this page.nn"
txt+="Error: " + msg + "n"
txt+="URL: " + url + "n"
txt+="Line: " + l + "nn"
txt+="Click OK to continue.nn"
alert(txt)
return true
}
// name,age,dayes,time,rate,salary
name = prompt("name of employee # 1", "")
age = prompt("Age", "")
dayes = prompt("# of dayes worked", "")
time = prompt("part time(0),full time(1)", "")
rate = prompt("rate per hour", "")
question = confirm("enter more employee?")
function salary()
{
if(age<30)
{
if(time==0)
{return dayes*4*4*rate}
else if(time==0)
{return dayes*8*4*rate}
}
else if(age>30&&age<40)
{
if(time==0)
{return dayes*4*4*rate*1.1}
else if(time==0)
{return dayes*8*4*rate*1.1}
}
else if(age>40&&age<50)
{
if(time==0)
{return dayes*4*4*rate*1.2}
else if(time==0)
{return dayes*8*4*rate*1.2}
}
else if(age>50)
{
if(time==0)
{return dayes*4*4*rate*1.3}
else if(time==0)
{return dayes*8*4*rate*1.3}
}
}
function tax(salary)
{
if(salary>1000)
{
return tax=salary*.05
}
else if(salary>2000)
{
return tax=salary*.1
}
else if(salary>4000)
{
return tax=salary*.15
}
else
tax=0
net_salary=salary-tax
}
</script>
</head>
<body>
<script type="text/javascript">
<table border = "border">
<tr>
<th> emp name</th>
<th> age </th>
<th> salary </th>
<th> tax </th>
<th> net salary </th>
</tr>
<tr>
<td> document.write(name) </td>
<td > document.write(age) </td>
<td > document.write(salary) </td>
<td > document.write(tax) </td>
<td > document.write(net_salary) </td>
</tr>
</table>
</script>
</body>
</html>
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
[Non-text portions of this message have been removed]
.