Connecting Tech Pros Worldwide Forums | Help | Site Map

onkeyup event is not working in firefox..

Newbie
 
Join Date: Jul 2007
Posts: 1
#1: Jul 24 '07
hey can anybody tell me y my onkeyup event is not working in firefox.. it is working fine in IE... code

[HTML]<input type="text" name="oddteam" size="1" value="1" onkeyup="javascript:calculate_stake();" >
[/HTML]
Expand|Select|Wrap|Line Numbers
  1. <script type="javascript">
  2. function calculate_stake()
  3. {
  4.  
  5. //document.getElementById("potential_earnings_currency").innerHTML=
  6. //    document.createbet2.play_amount.value
  7. //    * document.createbet2.oddopponent.value)
  8. //    / (document.createbet2.oddteam.value);
  9. //if (window.event.keyCode == 13 || window.event.keyCode == 8) window.event.keyCode = 0;
  10. document.getElementById("potential_earnings_currency").innerHTML=
  11.     (document.getElementById("play_amount").value
  12.     * document.getElementById("oddopponent").value)
  13.     / (document.getElementById("oddteam").value);
  14.  
  15.  
  16. }
  17. </script>

gits's Avatar
Moderator
 
Join Date: May 2007
Location: Munich, Germany
Posts: 4,136
#2: Jul 24 '07

re: onkeyup event is not working in firefox..


hi ...

i think you only have to fix the typo:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
kind regards
Reply