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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need serious help on these questions!

    JavaScript functions must be called:
    A. from the server
    B. implicitly
    C. explicitly
    D. A and C, but not B.
    E. None of the above.

    JavaScript commands written outside of a function will be executed:
    A. by the server.
    B. implicitly.
    C. explicitly.
    D. never, they are ignored.
    E. None of the above.

    The best loop for iterating through an array is
    A. Enhanced For loop
    B. While
    C. Do Until
    D. Do While.
    E. None of the Above.

    JavaScript Arrays are always passed to functions?
    A. By Reference.
    B. By Value.
    C. Globally.
    D. As a string.
    E. None of the Above.

    The best way to execute JavaScript code when you first bring up a page is:
    A. onload event
    B. JavaScript code outside of any function.
    C. onstart event.
    D. All of the above.
    E. None of the Above.



    Write a JavaScript function to handle a callback:

    Assume the following input fields:

    <input type="text" id="lastName" name="lastName" />
    <input type="text" id="firstName" name="firstName" />
    <input type="text" id="phone" name="phone" />
    <input type="text" id="email" name="email" />

    A callback function will receive a pipe delimited string from the server as such:

    Last-name|first-name|phone#|email

    Example: Doe|Jane|415-555-1212|jane.doe@gmail.com

    The callback function is:

    function customer_Callback ( content )
    {
    // use the split method to convert content to an array.
    // use document.getElementById() to get each of the above input fields.
    // populate from the array.
    }


    -----------------------------------------

    I am having serious trouble with these problems, I beseech you! There will be a special prize to whoever answers correctly all these questions first. Thanks!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,918
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Sorry, we will not do your homework for you. Please see forum rule #1.5.

    It is not really in your best interests that others do your all or most homework for you. Your teacher may gain a false and
    exaggerated idea of your programming capabilities and so not offer you the support you need.
    Also, if you hand in other people's work which you do not completely understand, then you will start to fall behind and
    your difficulties will increase. So you are reallly cheating yourself.


    It is your responsibility to die() if necessary….. - PHP Manual

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,634
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    Quote Originally Posted by RejectionDec15 View Post
    I am having serious trouble with these problems, I beseech you!
    So, what is the trouble you’re having? What have you done so far to solve the assignment? As Philip said, we’re not here to do your homework, we’re here to help you understand and solve it yourself.

  • #4
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,918
    Thanks
    56
    Thanked 545 Times in 542 Posts
    what's the "special prize"?


  •  

    Posting Permissions

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