[Javascript] Calculate a percentage of something [quick]

Cut and paste the below into the section of your page:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<SCRIPT language=JavaScript>

function perc1() {
 a = document.form1.a.value/100;
 b = a*document.form1.b.value;
 document.form1.total1.value = b
 }
function perc2() {
 a = document.form1.c.value;
 b = document.form1.d.value;
 c = a/b;
 d = c*100;
 document.form1.total2.value = d
 }
//-->
</SCRIPT>

<FORM name=form1>
<TABLE cellSpacing=1 cellPadding=1 border=1>
  <TBODY>
  <TR>
    <TD align=middle colSpan=3><B><FONT size=4>Percentage Calculator</FONT></B>
      </TD>
  <TR>
    <TD>What is <INPUT size=5 name=a> % of <INPUT size=5 name=b>?</TD>
    <TD>Answer: <INPUT maxLength=40 size=5 name=total1></TD>
    <TD><INPUT onclick=perc1() type=button value=Calculate></TD>
  <TR>
    <TD><INPUT size=5 name=c> is what percent of <INPUT size=5
name=d>?</TD>
    <TD>Answer: <INPUT size=5 name=total2> %</TD>
    <TD><INPUT onclick=perc2() type=button value=Calculate></TD>
  <TR>
    <TD align=middle
colSpan=3><INPUT type=reset value=Reset></TD></TR></TBODY></TABLE></FORM>

An end to negativity in our Community

I enjoyed Chris Williams presentation at JSconf, a call to action for ending negativity. I have to admit that I have been through that path myself resulting in sharp debates and heated arguments and wasn’t worth it most of the times. I agree on the part that tools will always be nothing else but tools  and not religions etc, but what about a little passion? I mean the reason we argue so much and slap each other on the face occasionally is because we love what we do. Then again doing it in the open always results in “chest pounding” and “mines better ” mentalities and that’s why I give the speaker “social-awareness” points. If you are going to argue you should do it over pints in the pub(or IM whatever is more suitable). I find this way far more constructive than flaming someone (fake)anonymously. I find that constructive feedback from peers is always welcome within the community; hence it about how you express yourself and the means you use to do so.
 
Also the logo beats the rhino and the silly cup of coffee so why not ;)