View Full Version : Just looking for some help if possible.
12-09-2009, 11:23 PM
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.:D
12-10-2009, 12:02 AM
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?
12-10-2009, 12:58 AM
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.
12-10-2009, 01:52 AM
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,
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:
and here are a couple of other simplistic ones I was playing around with:
(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.
12-10-2009, 02:32 AM
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. :D
Thanks for your support! I promise if you help me establish these features it will not go unnoticed.
12-10-2009, 03:03 AM
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:
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 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.
12-10-2009, 03:21 AM
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
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.
I got into the language too fast and I'm lost at this point on how to create these attributes.
12-10-2009, 07:25 AM
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.
12-10-2009, 07:27 AM
Ahhh, now...if you had told us, in the first place, that this was homework, we would have pointed you here:
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?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.