![]() |
Complex JS Assigment
Hi there everyone!
I have a couple things I need help with and I'm very new to javascript as I'm taking a class on this right now. We have an extra credit assignment that I'd really like to have. It's meant to be fairly vague and open for interpretation. Here's what it says: Quote:
We only have to do 2 out of the three options. Ideally I'd like to combine at least 2 of them into one document and make it an awesome assignment. If there's a way to combine all 3 that'd be even more awesome. Can you guys point to resources that ideally already have most of this created so I just have to merge it together and maybe make some of my own little markup? Or would it take very long for someone here to do 2 of these for me really quick? If the latter is an option, I'm willing to pay a little bit of money for your time. Thanks! |
so, can we help you cheat and if that requires some effort you'll throw some change at us?
love the optimism... |
Honestly yes, but I do actually learn faster and more efficiently if I look at other people's code. So it does actually help me out in the long run as far as actually learning it goes.
|
Quote:
|
The second and third ones there aren't really all that complex or hard.
For the second one, you just use the standard self-invoking anonymous function and you allow HTML elements to interact with it by specifying (for example) dummy class names, where the class name(s) tell your JS code what to do. The third one is truly simple: cookies. And you could implement it with the same self-invoking anonymous function used in the second answer, so it's easy to combine those two. In fact, you can easily fulfill both those by, for example. using a class name on various form fields or other user choices to indicate a value that needs to be stored in the cookie and then restored on page load. |
Quote:
|
Quote:
The assignment you post seems to me too advanced and inappropriate for someone who claims to be "very new to Javascript". Resources - what is wrong with your course tutorial meterials? |
Quote:
|
Here is a VERY stripped down version of some code you could use. You can find setCookie and getCookie scripts all over the web, for example, so I leave them to you.
Code:
<html> |
p.s.: getElementsByClassName() is not available on older MSIE, but I can't see how that would matter for an assignment.
|
| All times are GMT +1. The time now is 05:03 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.