0

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 ?..

2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by uselessninja
0
<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" />

Edited by floatingDivs: n/a

0
<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 :)

0

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" />
0

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 ...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.