SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    beginners javascript

    Hi Guys
    for starters im glad that this site exists, ive just had a bit of a browse through and i found theres alot of resources on here for beginner web designers like me. i however have stumbled upon a very difficult set of questions and i would like to pose them here to see if i may get some help with....

    1. Write a JavaScript code that calculates the factorial of the numbers 1-12.
    Note: Factorial equation/formula is: N! = N (N-1)(N-2)(N-3)…..(3)(2)(1)

    2. An online bank wishes you to write a piece of web-based solution that allows
    customers to pay their utility bills online. To create this application, use the following
    advices:
    a. Create an XHTML web interface/form called payment.html that is laid out correctly,
    with a sensible title and that contains components for the following data
    (1) First Name,
    (2) Last Name,
    (3) Telephone Number
    (4) Email address,
    (5) Account number
    (6) Utility company:
    i Gas
    ii Electricity
    iii Water
    (7) Amount to pay
    (8) Payment method
    i Visa Card (10% charge)
    ii Debit Card (7% discount)
    iii Master Card (9.5% charge)
    (9) A Pay & Finish button
    (10)A Reset Form button
    (11)A Label or Textbox to show the result

    b. Following on from (point a) write a JavaScript code that is called by the Pay & Finish
    button in payment.html to process the data collected and returning a sensible and
    meaningful message in the label or Textbox (point 11) (e.g. We are processing your
    request and the total of your payment will be …………. Please allow two days for your
    payment to be fully done).

    c. You also need to write a JavaScript code that is called by the Reset Form button in
    payment.html to reset/clear the form.

    i can sort of manage with the first part and write the basic HTML/XHTML needed to produce the page but upon reaching the javascript section im completely lost, also in the first question about factorials im a little stung as well.
    can someone please help me out with this and from their solution i can then understand how this works and be able to add to it or remember it for future purposes. i am studying webdesing and internet applications alone at home so its a little confusing at this stage
    thank you for your answers in advance!

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,333
    Mentioned
    463 Post(s)
    Tagged
    8 Thread(s)
    Hi reloaded3k. Welcome to SitePoint.

    I don't mean to be rude, but this looks a lot like a take-home exam to me. Could you just say a bit more about what this really is? We really don't want to be doing your exam for you.

    Given that these are mostly JavaScript questions, this thread would probably be best moved to the JS forum, which I will do now.


Tags for this Thread

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
  •