Results 1 to 3 of 3
  1. #1
    flambookey is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Default Creating Clear and Exit Buttons

    Hi, I'm trying to create two buttons for clearing my information, and another for terminating the program, or and Exit button. Here is my code as of now. the project i'm doing is listing my grades, averaging them, but i need a clear button and an exit button for it to be complete.

    <html>
    <head><title>Computer Science Grade Calculator</title></head>
    <body>
    <h2 align="center">Grade Calculator<h2>
    <hr width="86%" size="1" />

    Student Name: <tr>
    <td><input type="text" name="identifier" value="Edward Holt" size="10" onChange="event_handler"/></td>
    </tr>

    </br>

    Class: <tr>
    <td><input type="text" name="identifier" value="CS140 EB" size="7" onChange="event_handler"/></td>
    </tr>
    </br>

    Lab HW Quiz 1 : <tr>
    <td><input type="text" name="identifier" value="7" size="4" onChange="event_handler"/></td>
    </tr>

    </br>

    Project : <tr>
    <td><input type ="text" name="identifier" value="4" size="4" onChange="event_handler"/></td>
    <td><input type ="text" name="identifier" value="9" size="4" onChange="event_handler"/></td>
    <td><input type ="text" name="identifier" value="8" size="4" onChange="event_handler"/></td>
    <td><input type ="text" name="identifier" value="8.5"size="4" onChange="event_handler"/></td>
    </tr>

    </br>

    Tests: <tr>
    <td><input type ="text" name="identifier" value="60" size="4" onChange="event_handler"/></td>
    <td><input type ="text" name="identifier" value="75" size="4" onChange="event_handler"/></td>
    </tr>

    </br>

    Final Exam: <tr>
    <td><input type ="text" name="identifier" value="100" size="4" onChange="event_handler"/></td>
    </tr>

    </br>

    <tr>
    <td><input type=button value="Clear" onClick ='
    "" '></td>

    <td><input type="button" value="Exit" onClick =
    </td>

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    5

    Default

    you can use html or javascript to accomplish these requirements. i'm asking me why you put this thread in a java forum?

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Similar Threads

  1. creating buttons
    By defactor in forum New To Java
    Replies: 5
    Last Post: 01-02-2010, 02:06 PM
  2. Radio Buttons - Reset - clear dot
    By dbashby in forum New To Java
    Replies: 5
    Last Post: 10-14-2009, 12:17 AM
  3. How to exit the program by typing "exit"?
    By Laythe in forum New To Java
    Replies: 6
    Last Post: 08-19-2009, 08:32 PM
  4. System.exit 0 or 1?
    By antgaudi in forum New To Java
    Replies: 3
    Last Post: 11-13-2008, 06:33 PM
  5. How to exit the program..
    By coco in forum New To Java
    Replies: 1
    Last Post: 08-01-2007, 05:56 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
  •