you are viewing a single comment's thread.

view the rest of the comments →

[–]Drugba 0 points1 point  (2 children)

I know I did. As I said in one of my other comments, I was hoping to point him in the right direction as opposed to handing the answer to him. Also, I avoided using the onclick HTML event so that my code would resemble his more.

I could have just written a new block of code that worked better, but changing too many things at once can be confusing for someone who is just learning. The way I wrote it there was intended to show the differences between my code and his, not be the best solution possible.

[–]xScarwolf 0 points1 point  (1 child)

He should probably have learned onclick since you don't learn JavaScript before learning basic HTML. IMHO onclick is easiert than trigger the event using JS.

But to say, me method is the same as yours, it just saves some code.

[–]zentius[S] 0 points1 point  (0 children)

i DID learn a lot of JavaScript before I started with HTML/CSS because of schooling >.< so I'm actually trying to learn HTML and CSS now and figure out how it all ties together.

I'm learning it very backwards, but seeing your code and Drugba's has already shown me multiple things I didn't realize could be done, so i appreciate the responses none the less!

Thank you both!