SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    May 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Hey can someone take a look at this for me

    hey can someone take a look at this for me im not fully sure if it will pass, its part of my technical documentation for collage, heres the website its made on
    http://joes-fruit-shop.orgfree.com/Joe's%20Fruit%20Shop%20Order%20Form.html

    The project....
    Task 2
    You should, in conjunction with developing your order form, also produce technical and user documentation for your script. I have provided several links below that discuss writing software documentation to help get you started.

    My work....
    The Java script for Joe's Fruit Shop was created using Dream Weaver CS4, a form was created then the “Validate Form”function was used, Code View was used to debug the Java Script. All of the HTML was created using Dream Weaver and debugged using Code View the site was uploaded using SmartFTP Client and hosted by www.orgfree.com.

    Tables were used for the main layout of the form, Horizontal Rules were used to separate each area of the form.

    A video of the Validating form function in Dreamweaver can be viewed by clicking the link bellow the same method was used to create the JavaScript on the Joes Fruit Shop site. http://www.youtube.com/watch?v=KpJnwbyxUE4

    All of the areas that contain a “*” symbol next to them must be filled in to complete the form if those areas are not filled in and submit is clicked a Message box will appear alerting the user of what fields haven’t been filled.

    Number fields have been created so the user can’t enter letters into fields such as “Post Code” “Home Phone” and so on. If the user does enter letters into these fields a message will appear alerting the user.

    Drop down boxes where used though out the site and the user must select one option within each drop down, if no selections are made and submit is clicked the empty dropdowns will turn red alerting the user to select an option.

    A clear form button is also included allowing the user to clear the form of any information they may have entered, also a submit button that will allow the user to submit the form.

    Areas on the form that where included:
    Your details and delivery address:
    • Full Name (letters only field)
    • Home Phone (numbers only field)
    • Mobile Phone (numbers only field)
    • Address (number and letter field)
    • State (menu drop down)
    • E-Mail ( “@” symbol is required for this field)
    • Work Phone (numbers only field)
    • City/Suburb (letters only field)
    • Post Code (numbers only field)

    Credit card details:
    • Card Type (menu drop down)
    • Expiry date Month/Year (menu drop down)
    • Card number (numbers only field)
    • Card holder's name (letters only field)

    Purchase details:
    • Items (menu drop down) in total 5 item menu for selection
    • Quantity (menu drop down) in total 5 item menu for selection


    //This area of the code will set out the rules/guidelines of the form, for example an @ symbol must be used within an E-mail area, or only numbers are to be entered into the postcode area.
    <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function MM_validateForm() { //v4.0
    if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
    if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
    if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
    } else if (test!='R') { num = parseFloat(val);
    if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
    if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
    min=test.substring(8,p); max=test.substring(p+1);
    if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
    } }
    //-->
    </script>

    //Input area for Full Name
    <input name="Your full name" type="text" id="Your full name" size="50" />

    //Input area for Work phone number
    <input name="Work" type="text" id="Work" />

    //Input area for Home contact phone number
    <input name="Your home contact number" type="text" id="Your home contact number" />

    //Input area for Mobile phone number
    <input name="Mobile" type="text" id="Mobile" />

    //Input area for delivery address
    <input name="Address" type="text" id="Address" size="70" />

    //Input area for City/Suburb
    <input name="City/Suburb" type="text" id="City/Suburb" size="30" />

    //Adds the object State type and
    // sets options for object State type
    <select name="select13" id="select13">
    <option>Select a state</option>
    <option value="1">QLD</option>
    <option value="2">VIC</option>
    <option value="3">NSW</option>
    <option value="4">WA</option>
    <option value="5">NT</option>
    <option value="6">ACT</option>
    <option value="7">SA</option>
    <option value="8">TAS</option>
    </select>

    //Input area for Post code
    <input name="Post code" type="text" id="Post code" size="10" />

    //Input area for E-mail address
    <input name="Email address" type="text" id="Email address">

    //Adds the object Card type and
    // sets options for object Card type
    <select name="Card type" id="Card type">
    <option>Please select card type</option>
    <option value="1">Visa</option>
    <option value="2">Master Card</option>
    <option value="3">AMX</option>
    </select>

    //Adds the object Month type and
    // sets options for object Month type
    <select name="Month" id="Month">
    <option>Month</option>
    <option value="1">Jan</option>
    <option value="2">Fab</option>
    <option value="3">Mar</option>
    <option value="4">Apr</option>
    <option value="5">May</option>
    <option value="6">Jun</option>
    <option value="7">Jul</option>
    <option value="8">Aug</option>
    <option value="9">Sep</option>
    <option value="10">Oct</option>
    <option value="11">Nov</option>
    <option value="12">Dec</option>
    </select>

    //Adds the object Year type and
    // sets options for object Year type
    <select name="Year2" id="Year2">
    <option>Year</option>
    <option value="1">2009</option>
    <option value="2">2010</option>
    <option value="3">2011</option>
    <option value="4">2012</option>
    <option value="5">2013</option>
    </select>

    //Input area for Credit card number
    <input name="Credit card number" type="text" id="Credit card number"></td>

    //Input area for Card holders name
    <input type="text" name="Card holders name" id="Card holders name">

    //Adds the object Item type and
    // sets options for object Item type
    <select name="select1" id="select1">
    <option>Item</option>
    <option value="0">No item</option>
    <option value="1">Alfalfa sprouts $1.50 per punnet</option>
    <option value="2">Apples, Bonza $5.99KG</option>
    <option value="3">Apples, Golden Delicious $4.99KG</option>
    <option value="4">Artichoke hearts, pickled $17.99KG</option>
    <option value="5">Avocados, dark, large 2 for $3.50</option>
    </select>

    //Adds the object Quantity type and
    // sets options for object Quantity type
    <select name="select2" id="select2">
    <option>Quantity</option>
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    <option value="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option value="9">9</option>
    <option value="10">10</option>
    </select>

    //This area of the code checks the values of each of the Input and Selection boxes if no input/selection is made within one of the required areas the java script will report a fouls reading and a message box will appear alerting the user
    <input name="submit" type="submit" id="button" onClick="MM_validateForm('Your full name','','R','Work','','NisNum','Your home contact number','','RisNum','Mobile','','NisNum','Address','','R','City/Suburb','','R','Post code','','RisNum','Email address','','RisEmail','Credit card number','','RisNum','Card holders name','','R');return document.MM_returnValue" value="Submit"></td>

    //This area of the code will reset the form for the user
    <label>
    <input type="reset" name="Clear" id="Clear" value="Clear">
    </label>

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    A part of the requirements is to produce "technical and user documentation" for your script.

    Have you created those documents as well?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    May 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what i put in my 1st post is wat the teacher classed as technical and user documentation, wat you think ? good bad give up? lol

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    The person running your course should have examples of technical documentation, and user documentation, that you can use as an example for what is expected from you.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    May 2010
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    he has never given me anything like that, what i dont really like is it takes 2+ weeks for him to mark the work and iv tryed calling him for help but he is never in the office and it takes 1 week for him to reply to emails, would you have any examples of technical documentation and user documentation?

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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