...

View Full Version : Just looking for some help if possible.



Anomaly781
12-10-2009, 12:23 AM
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

Old Pedant
12-10-2009, 01: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?

Anomaly781
12-10-2009, 01: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.

Old Pedant
12-10-2009, 02: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,
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.

Anomaly781
12-10-2009, 03: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.

Old Pedant
12-10-2009, 04: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:

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.

Anomaly781
12-10-2009, 04: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
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.

Philip M
12-10-2009, 08: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.

Old Pedant
12-10-2009, 08:27 AM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum