i've been searching google and all i see is with button snippets

...can someone help me on how to multiply two textbox and displaying it to third texbox without using button ?..

<script type="text/javascript">
	function multiply() {
		document.getElementById('text3').value = document.getElementById('text1').value * document.getElementById('text2').value;
	}
</script>
<input type="text" id="text1" onmouseout="multiply()" />
<input type="text" id="text2" onmouseout="multiply()" />
<input type="text" id="text3" />
<script type="text/javascript">
	function multiply() {
		document.getElementById('text3').value = document.getElementById('text1').value * document.getElementById('text2').value;
	}
</script>
<input type="text" id="text1" onmouseout="multiply()" />
<input type="text" id="text2" onmouseout="multiply()" />
<input type="text" id="text3" />

Thankzz dude ^^ but have some kinda slow computation hehe ... thankzz btw :)

Try this.

<script type="text/javascript">
	function multiply() {
		document.getElementById('text3').value = document.getElementById('text1').value * document.getElementById('text2').value;
	}
</script>
<input type="text" id="text1" onkeydown="multiply()" />
<input type="text" id="text2" onkeydown="multiply()" />
<input type="text" id="text3" />

Try this.

<script type="text/javascript">
	function multiply() {
		document.getElementById('text3').value = document.getElementById('text1').value * document.getElementById('text2').value;
	}
</script>
<input type="text" id="text1" onkeydown="multiply()" />
<input type="text" id="text2" onkeydown="multiply()" />
<input type="text" id="text3" />

wew...thankzzz...awsome... nice one dude ..thank u ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.