Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] JS Q please help, !Strange....


  • From: javascript@xxxxxxxxxx (BEKIM BACAJ)
  • Subject: [Javascript] JS Q please help, !Strange....
  • Date: Fri, 28 Feb 2003 03:07:34 +0100

I never posted this mesage as a rich-text, why is it apearing rich?
-Could it been captured and re-sent from another server?

I vill try to post this answer once again as plain text in order, to be 
wiewed as it is written for the guy whoe needs the script function to be 
visible.


<html>
<head>

</head>

<body>
	<center>
<form name="farmform">

<input type="text" size="20" value="Cows">
<input type="text" size="4" value="77"><p>
<input type="text" size="20" value="Sheep">
<input type="text" size="4" value="120"><p>
<input type="text" size="20" value="Goats">
<input type="text" size="4" value="3"><p>
<input type="text" size="20" value="Pigs">
<input type="text" size="4" value="3"><p>
<input type="text" size="20" value="Horses">
<input type="text" size="4" value="3"><p>
<input type="text" size="20" value="Mules">
<input type="text" size="4" value="17"><p>
<input type="text" size="20" value="Chickens">
<input type="text" size="4" value="43"><p>
<input type="text" size="20" value="Ducks">
<input type="text" size="4" value="120"><p>
<input type="text" size="20" value="Raptors">
<input type="text" size="4" value="7"><p>

</form>
<Button onClick="farmcount()">GO</button>
	</center>

<SCRIPT LANGUAGE=JavaScript>

	var s=farmform.length;//if you put button inside the Form, write 
s=farmform.length-1
	var fn=new Array();

function farmcount(){

	 for(i=0; i<s; i++) {

		 fn[i]=' '+farmform.elements[i].value;
	}
document.write(document.body.innerHTML +"<b><CENTER>"+fn+".</CENTER></b>");
	}

</SCRIPT>

</body>
</html>




_________________________________________________________________