01 November 2006

Recent Discoveries in Web Design (for me)

Needing to grab the current UNIX timestamp in JavaScript and aren't wanting to bother with the usual crap (creation of Date() objects, manipulating dates, etc)? Well, if that's the case, just use the following code wherever you need it:

(new Date()).getTime();

Tack that onto anything you want in place of a variable and it will automatically return as the current timestamp.

Something else I've found out -- when you're making web apps and you're mixing Notes objects (buttons and stuff) and pass-through HTML, make sure you leave at least one space of non-pass-through text between the object and your pass-through HTML! Why? Because, as I've discovered, if your Notes object that you're trying to make appear on the web is touching an area of pass-through HTML, weird stuff happens... namely your button not showing up on the web. This seems to be all the more prevalent if the button you're creating uses only JavaScript on the web (it has no client-side code).

Additionally, you just have to take a look at this: http://www.schillmania.com/projects/soundmanager/.

I tell you, it's programmers such as this guy that are taking the fun out of banging your head against the wall for hours at a time. This fellow has made an absolutely seamless method of integrating sound into a web app -- no more funky proprietary HTML code, no Java applet embedding, just good ol' fashioned JavaScript... and a tiny, tiny embedded flash file. Hey! Pay no mind to that -- it works perfectly.

...I've even got the bloody thing to work in a Domino database...

No comments:

Post a Comment