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

    Just looking for some help if possible.

    Hey I realize I'm being a megabum but would be willing to show $ appreciation for anyone who could write some code for me... So with that said this is what I need...

    A function to create a digital clock that has hours, minutes, and seconds.
    setTime() to set the current time
    displayTime() to display the time

    A second script modified from the first one that incorporates the date object to set the time.

    Thirdly I need an array for eight different things, which I will insert, that will pop up on load.

    An array of four things that will display in a slideshow which moves every 10 seconds with a start and stop button down below.

    Nothing to fancy, just as basic as possible to achieve these goals. Like I said before it will be appreciated in value.
    Last edited by Anomaly781; 12-10-2009 at 03:32 AM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    Why do you need displayTime()??? You mean you want that function to return the current time as a string for you to drop in some place?

    And how does the second script differ from the first? You'd have to incorporate the Date object in order to "set the current time". Unless you meant that setTime() would accept arguments to set the time to a user-specified value?

    And the "Thirdly": What kind of "things" are those eight??? Images? Text? Sound? Video?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry to be unclear but for your first two questions you hit the nail on the head, so yes.
    And for the array I just want it to return a simple statement in a pop up box, but to have it be a random array with different possible statements.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    Baby steps. But we get there.

    Okay, for the setTime() call, what format do you want to use for what you pass in??

    For the array and the pop up box, who creates the popup? If not you, then what is it supposed to look like? Is it supposed to be modal (that is, the user can't do anything else on the page until he/she dismisses the popup)?? For example,
    http://www.clearviewarts.com/dogs.html
    Click on a thumbnail on that page and the overlay comes up and you can't do anything until you click on the overlay image to dismiss it.

    And what is the slideshow supposed to look like?? Here's one example of a dirt simple one:
    http://www.artsofsnohomish.org
    and here are a couple of other simplistic ones I was playing around with:
    http://www.ClearviewArts.com
    http://www.clearviewarts.com/sliderDemo2.html
    (Ignore the ugly green there...that was just to demo the concept.)
    Adding stop/start to any of those is easy. Or could just allow user to hover over an image to "freeze" it.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would like the time to be a 24 hour digital clock and have a prompt for the user which requests am or pm upon entering the current time.

    For the first array I just want to have a dialogue box pop up that, yes, is modal and requires the user who loaded the page to click an ok button.

    As for the slideshow the very simple one you have going on there is exactly what I'm looking for.

    Thanks for your support! I promise if you help me establish these features it will not go unnoticed.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    My head hurts.

    First you say you want to call a function with the time to be set, using 24-hour format, then you say you want to prompt the user for am/pm.

    So *YOUR* code on that page maybe does:
    Code:
         setTime("17:32:14");
    and then we ask the user if that is AM or PM??? HUH???? If it's a 24-hour input, there IS NO AM OR PM!! That's the whole point of using a 24-hour clock, isn't it??

    *******************

    You can easily swipe the code for the image slider from that ArtsOfSnohomish page.

    I've been using it for about 4 years now, pretty much unchanged. (Wow! I'll say! It still uses language="JavaScript" and I stopped doing that quite some time ago.)

    I like to have the show start on the same first image each time, but that could easily be changed.

    It's designed to fit into an <iframe> on the page where you use it. Doesn't have to be that way, but it much simplifies some of the positioning.

    As it is now, it expects images to fit into a 400(h) x 320(v) size. It auto-centers them if they are smaller in either dimension. Again, changing the size is pretty easy.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe this helps, these are my prompts =)

    Write a function that will create a digital clock object. The resulting
    object should have three properties: hours, minutes, and seconds. Write two
    methods:
    setTime() to set the current time to 2:15:35 and
    displayTime() to display the time.
    The user will be prompted to select either a.m., p.m., or military (24 hour) time and
    the selected value will be passed to the displayTime() method.

    Modify the script in Q1 so that setTime uses the date object to set
    the current time.

    Use the array and math objects to write a script that uses an array of 8 statements and randomly displays one each time the user reloads the page.

    Create a JavaScript program, that will produce a slideshow. Use an array for four (4) preloaded images. A timer will be set so that a new image replaces another image every 10 seconds. The show begins when the user presses a button labeled Start and stops when the user presses a button labeled Stop.

    I got into the language too fast and I'm lost at this point on how to create these attributes.

  • #8
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,316
    Thanks
    203
    Thanked 2,565 Times in 2,543 Posts
    So you are proposing to pay someone to do your homework for you? Don't you think that this might be considered to be, er, .. cheating? You will find that you cannot go through life getting others to do your work while you get the credit.

    Have a look at Forum Rule #5.

  • #9
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    Ahhh, now...if you had told us, in the first place, that this was homework, we would have pointed you here:
    http://www.codingforums.com/rules.htm

    And noted especially rule 1.5

    Under the circumstances, I think I may helped you more than I should have.

    Maybe you can still drop the class?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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