Archive for March, 2004

warning message when using window.close in javascript

When you want to close browser itself by javaScript, which is not opened by another browser window, you will be getting a warning message if you are on IE.

window.close();

However, if you do this window.opener = “whatever”; before calling window.close(), you won’t get a warning message.

That’s today’s tip!

xslt, xml, xpath

http://www.helpqlodhelp.com/blog/archives/000094.html

I took a look at the above link and thought I’d like to share what I’m doing at work with you.
Most of time my job is related to xml and xslt. Using those two monsters, manage content easily and make it portable so that the look of the site can be interchangable.

As long as you keep your content data either in relational database or xml database in oracle 9i, all you have to do in order to show client users is to prepare xslt stylesheet. With xml formatted data you can utilize it with any other technoloies and this is when XML kicks ass.

As of now, xpath version 1 is used. Meaning that with it you may end up with using javaScript to solve some scripting issues. That’s because xpath version 1 doesn’t offer much functionalities.

With understanding of XML and XSLT, you will look at the web site from totaly different perspective than you had before.

Maybe I’ll change my blog to my own blogging system utilizing xml and xslt someday. Also I’ll upload some tutorials someday too.

easiest timeout script?

In my personal project, I was to make timeout script for server’s responding. I think this is the simpleset form of timeout feature in flash you can come up with.
The below is what I came out:


var timeout:Number = 5000;
var timeoutInterval:Number;
var timeoutFunc:Function = function() {
clearInterval(timeoutInterval);
// do your own script.
}
timeoutInterval = setInterval(timeoutFunc, timeout);

In addition to that, I attempted to make a class for it so that you could use it like this:


var myTimeout = new Timeout(1000,myFunction);
myTimeout.start();

As for the class that I’m making, I will post it later tomorrow.