We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Coding help?
Topic Started: Dec 24 2013, 09:50 PM (268 Views)
ValorNET
Member Avatar
ZetaMember
[ * ]
Code:
 
function setBanner() {
var off = document.getElementById('Banner').className='recruitingOff';
var on = document.getElementById('Banner').className='recruitingOn';
window.onload = document(CHOSEN_VAR);
}
I can't seem to script this very well by myself. Here's what I have, although it doesn't work. What I'd like these codes to do, is IF variable is set to YES, it will make the div style "recruitingOn". If it's set to NO, it will set the div style to "recruitingOff". If it's neither or ELSE, write an alternate DEFAULT style type.


*Self-Solved.

I found a way to accomplish what I was after, through a different method.
If somebody wants to help with this code anyway, so I can learn something, that'd be great too.
Edited by ValorNET, Dec 27 2013, 05:26 PM.
Offline Profile Goto Top
 
Ferby
Member Avatar
Developer
[ *  *  *  *  * ]
I would recommend you learn jQuery, it's makes JavaScript coding a hell lot easier. Cory recommend jQuery when I was first learning JavaScript and I don't regret learning it. Just trying to be helpful :)
Offline Profile Goto Top
 
Moonface
Member Avatar


Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic