Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Someone who is good with JavaScript, I need help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Lyfa
The Lonely Man
Reputation: 12

Joined: 02 Nov 2008
Posts: 743

PostPosted: Tue Jul 13, 2010 4:36 pm    Post subject: Someone who is good with JavaScript, I need help Reply with quote

The code works fine and all, but it clears itself. Any ideas on how to stop this?
Code:
<form method="POST" onSubmit="calc()" name="berechnung">
   <table border="0">
      <tr><td>First Number:</td> <td><input type="text" name="breite" /></td></tr>
      <tr><td>Second Number:</td> <td><input type="text" name="zoll" /></td></tr>
      <tr><td>Result:</td> <td><input type="text" name="durchmesser" /></td></tr>
      <tr><td><input type="submit" value="Calculate" /></td></tr>
   </table>
<form>
<script type="text/javascript" language="javascript">
   function calc(){
      var breite = eval(document.berechnung.breite.value)
      var zoll = eval(document.berechnung.zoll.value)
      var durchmesser = (breite) + (zoll)
      document.berechnung.durchmesser.value = durchmesser;
   }
</script>

_________________
Back to top
View user's profile Send private message
HackOtaku
I posted the 500000th topic
Reputation: 81

Joined: 31 May 2007
Posts: 228

PostPosted: Tue Jul 13, 2010 5:18 pm    Post subject: Reply with quote

You named the var the same as you called the id. Collision.
Back to top
View user's profile Send private message
Lyfa
The Lonely Man
Reputation: 12

Joined: 02 Nov 2008
Posts: 743

PostPosted: Tue Jul 13, 2010 5:26 pm    Post subject: Reply with quote

That doesn't explain why it disappeared.
_________________
Back to top
View user's profile Send private message
bfsdbsdfbdsfb
Grandmaster Cheater
Reputation: 54

Joined: 06 Sep 2007
Posts: 702
Location: Oh noez.

PostPosted: Tue Jul 13, 2010 5:27 pm    Post subject: Reply with quote

Why is it in german?
_________________
bsdfbdsfb
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites