Results 1 to 2 of 2
  1. #1
    codeflip is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default Button Functions

    I need to add the number values of 2 texts boxes and make it appear in the third text box

    how would one do this?

    l

    XML Code:
     
    
    <html>
    <head>
    	<script language="javascript">
    	function buttonclick()
    	{
    		
    		
    	}
    
    
    	</script>
    
    </head>
    <body>
    
    		<h1><b><u>Rabbits vs. Foxes Population</u></b></h1><br>
    			
    			<form name="forma">
    <table border="1" width="50%" cellspacing="0" cellpadding="1">
    	<tr>
    				<td>Number of Rabbits</td>
    				<td><input name="numberofrabbits" type="text" size="6"></td>
    	</tr>
    	<tr>
    				<td>Death Rate</td>
    				<td><input name="deathrate" type="text" size="6"></td>
    	</tr>
    	<tr>
    				<td>Birth Rate</td>
    				<td><input name="birthrate" type="text" size="6"></td>
    	</tr>
    	<tr>
    				<td>No. of Foxes</td>
    				<td><input name="foxes" type="text" size="6"></td>
    	</tr>
    	<tr>
    				<td>Rabbit Conditions</td>
    				<td><Input type = radio Name = r1 Value = "N">Normal
    					<Input type = radio Name = r2 Value = "F">Fires
    					<Input type = radio Name = r3 Value = "E">Excellent</td><br>
    								
    	</tr>
    	<tr>
    				<td>Graph the Rabbits</td>
    				<td> <input type="checkbox" name="graphrabbits" value="checked"></td>
    	</tr>
    	
    	<tr>
    				<td><input type="button" onclick="buttonclick()" value="One Year Passes" size="30"></td>
    				<td>Years<input name="years" type="text" size="6"></td>
    	</tr>
    </table>
    </form>
    
    
    
    
    
    
    
    
    </body>
    </html>

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    First thing I'd do would be to ask this question in a javascript forum. Unfortunately this is a Java forum, a totally different beast.

    Best of luck.

Similar Threads

  1. Calling java functions from c++
    By khajalid in forum New To Java
    Replies: 13
    Last Post: 10-12-2010, 11:50 PM
  2. Functions in jsp
    By samson in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 03-25-2009, 11:04 PM
  3. problems with functions
    By kri in forum New To Java
    Replies: 6
    Last Post: 02-07-2009, 09:09 PM
  4. HashMap functions get vs put
    By tahni in forum New To Java
    Replies: 3
    Last Post: 01-14-2009, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •