I have a bunch of different snippets lying around, and sooner or later I'll probably assemble some sort of framework. My question: Is such a collection of code welcome, or must each submission be a solution to a specific problem. (Like a some certain form of array sorting or whatever it can be)
And even if this is not allowed, are scripts that rely on some framework allowed? As it is now, I have a library of functions, which makes some things easier to do, but picking out just the functions needed for a certain snipper, just to make legal to submit might be too much work. (The library functions are collections of functions, like array related functions, DOM related functions etc, and they depend on each other to some degree)
There are only 10 kinds of people in the world, those who don't understand binary, those who do, and those who know other number bases than 2, 10 and 16.
Things you should know about my replies: I usually don't test code before I post it. I use bold text for key words like document.getElementsByTagName.
Blog: Gameboy Genius
If you're happy with my response, say thanks. If not, ask again.
If it's a related library, that's fine to submit all at once. Otherwise, you can just post them on your site and I can download individually as I post them or you could just send them to all at once (via an attachment -- we could discuss) and I could post them that way. We have a section for snippets on the JSS site. The idea of having them separated (unless, as I said, they are related), is that someone can grab the one they need without having to download a lot of extra code.
Maybe at some point I could make a PHP or Perl validator, to run and see what old functions, properties, and methods are used that are deprecated or broswer specific. This would be fairly easy, and I would make it in an external text file or two, so that you can add thousands and change 'librauries' when needed to update it. But I'm not sure if I'll remain active on this forum... don't want to get tied up either in projects when my time is mostly full atm.
This whole bit of JavaScrript seems rather pointless to me when you could just use <label for=""> and an id=""
Was it really 2003 I joined these forums. And they still almost look identical! I think a new website design while we're talking about things to fix and improve. Yes I know Lee I'm off-topic - nooo dont attack me pleaseeeeeeeeeeeeeeeeeee.
Last edited by GavinPearce; 01-30-2008 at 04:47 AM.
The scripts section of the site (JSS) has been re-designed. I am in the (slow) process of moving them all over. I had started another thread for updating scripts. If you see any you want to update, just submit them over there and I'll give you credit. (BTW, we can always use freelance writers over at WebReference.com ... and we pay!)
Many of the scripts posted are for demo purposes, to teach, and also to help solve problems in general. There are also some older ones that I need to remove. I have also had many coders tell me they also use the site for inspiration for their own scripts, and that they sometimes gather snippets of scripts to use. Also, sometimes, people can't use server-side languages.
Well that very much depends if you want the local or server date.
On the flip side - using JavaScipt to display the server-time would also be pointless.
I do however agree with your point of it being a good code snippet for demostrating how to control form fields via JS as part of a larger project.