List Info

Thread: help me




help me
country flaguser name
United States
2007-08-18 12:06:06

what is the wrong in this program
pleas replay

<html xmlns = "http://www.w3.org/1999/xhtml&quot;>
<head&gt; <title&gt; test </title>
<script type = "text/javascript">
onerror=handleErr
function handleErr(msg,url,l)
{
txt="There was an error on this page.nn&quot;
txt+="Error: " + msg + "n&quot;
txt+="URL: " + url + "n&quot;
txt+="Line: " + l + "nn&quot;
txt+="Click OK to continue.nn"
alert(txt)
return true
}

// name,age,dayes,time,rate,salary
name = prompt(&quot;name of employee # 1", "&quot;)
age = prompt(&quot;Age";, "&quot;)
dayes = prompt(&quot;# of dayes worked&quot;, "&quot;)
time = prompt(&quot;part time(0),full time(1)&quot;, "&quot;)
rate = prompt(&quot;rate per hour", "&quot;)
question = confirm(&quot;enter more employee?&quot;)

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&gt;2000)
{
return tax=salary*.1
}

else if(salary&gt;4000)
{
return tax=salary*.15
}
else
tax=0
net_salary=salary-tax
}

</script>
</head>
<body&gt;
<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>

__._,_.___
.

__,_._,___
Re: help me
country flaguser name
United States
2007-08-20 09:05:23

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">gmmmg1yahoo.com> wrote: what is the wrong in this program
pleas replay

<html xmlns = "http://www.w3.org/1999/xhtml&quot;>
<head&gt; <title&gt; test </title>
<script type = "text/javascript">
onerror=handleErr
function handleErr(msg,url,l)
{
txt="There was an error on this page.nn&quot;
txt+="Error: " + msg + "n&quot;
txt+="URL: " + url + "n&quot;
txt+="Line: " + l + "nn&quot;
txt+="Click OK to continue.nn"
alert(txt)
return true
}

// name,age,dayes,time,rate,salary
name = prompt(&quot;name of employee # 1", "&quot;)
age = prompt(&quot;Age";, "&quot;)
dayes = prompt(&quot;# of dayes worked&quot;, "&quot;)
time = prompt(&quot;part time(0),full time(1)&quot;, "&quot;)
rate = prompt(&quot;rate per hour", "&quot;)
question = confirm(&quot;enter more employee?&quot;)

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&gt;2000)
{
return tax=salary*.1
}

else if(salary&gt;4000)
{
return tax=salary*.15
}
else
tax=0
net_salary=salary-tax
}

</script>
</head>
<body&gt;
<script type=";text/javascript";>

<table border = "border">;

<tr>
&lt;th> emp name</th>
<;th> age </th>;
<th&gt; salary </th>;
<th&gt; tax </th>;
<th&gt; net salary </th>;
</tr>

&lt;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>
&lt;/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]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )