Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Newbie...Urgent deadline tomorrow!

    I am a javascript newbie! I know nothing about javascript whatsoever. I am having a HUGE problem with a code. I attached the zip file which is the actual grocery list. I also copied and pasted the code in case the zip file does not show up. Any help would be appreciated. Please help I do not know what I am doing =(...

    Create a Web page that can be used to write a sorted grocery list. The user will select a category by using radio buttons, then type the name of a grocery item. When the user hits the Add to List button the item is added to the list. Each item should be added in the form “Category > Item”, for example “Produce > Apple”. When the user is finished entering items in any order, she can use the Print Sorted List button to create a sorted list of all of the added groceries. The code containing the form has already been written and can be downloaded (case06–2data.zip). To complete the project you should implement the addItem() and printSortedList() functions.



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>
    <head>
    <title>Grocery List</title>
    <script language="JavaScript">
    <!-- HIDE FROM INCOMPATIBLE BROWSERS
    function addItem() {

    }

    function printSortedList() {

    }
    // STOP HIDING FROM INCOMPATIBLE BROWSERS-->
    </script>
    </head>
    <body>
    <form name="groceryList">
    Category: <input type="radio" name="category" value="Produce">Produce</input>
    <input type="radio" name="category" value="Meat and Cheese">Meat and Cheese</input>
    <input type="radio" name="category" value="Grocery">Grocery</input>
    <input type="radio" name="category" value="Beverage">Beverage</input>
    <br />
    Item: <input type="text" length="30" name="item" />
    <p />
    <input type="button" name="add" value="Add to List" onClick="addItem()"/>
    <p />
    <select name="list" size="10" style="width:500"></select>
    <p />
    <input type="button" name="sort" value="Print Sorted List"
    onClick="printSortedList()"/>
    </form>
    </body>
    </html>
    Attached Files Attached Files
    Last edited by JS-Newbie; 04-15-2005 at 01:32 PM.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I know nothing about javascript whatsoever.
    That is too bad. How can we suppose to help you if you are not able to understand what we are talking about?... Anyway, which is in fact your problem?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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