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

BEKIM BACAJ trojani2000 at hotmail.com
Thu Feb 27 20:07:34 CST 2003


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>




_________________________________________________________________





More information about the Javascript mailing list