Monday, 21 January 2008

2 Months of Break....& I'm Back

Arrggh sadly this blog has stop being updated for 2+ months now!!! argggh >o<

But yeah after a month of 'dedication' and a month of 'vacation' and a couple of weeks to catch up with my life........ LemonTz is back in town!!!

Over the last couple of months I have definitely thought of a lot of stuffs to write and in particular a few things that I MUST write about....and now that I had my time to recover (and got off my lazy bum!!! hehe).....yes I'm finally energized to start blogging again!!!

So there'll be more posts to come, hopefully over the next couple of weeks!!! And I better start on my FIRST ONE now!!!

Wednesday, 7 November 2007

Anchor vs JavsScript New Window

So today I was working on a very simple problem.....I thought! Turned out to be a lesson for me and once again one of those usual web development weirdness!

The main problem is this. I want to open up a new browser window at a specific position and specified width and height. However I want the new browser window to look exactly like the client's browser window. By this I mean it should inherit those features of the client's browser e.g. status bar, menu bar, tool bar.

(P.S. - If the client decided NOT to include the status bar in their browser window, the new window that is opened up should follow this too! i.e. this is something I do not know in advance!)


So there are two ways to open up a new window:
  1. Anchor:
    <a href=\"index.html\" target=\"windowName\">
    Glossary index
    </a>
  2. Javascript, window.open():
    window.open(''+self.location,'mywin',
    'left=20,top=20,width=500,height=500,toolbar=yes,resizable=no ');

Now the differences between the two and the problem I encountered:

If you use the JavaScript method with window.open(), you are able to open up a new browser window at a certain position and with a specific dimension. However, problem is the popup window does not inherit the features of the client's browser.

So what about the anchor!? Well yes it does open up a new browser window that inherits the features...but (-.-" yes there's always a but isn't it!)....you won't be able to specify the position and dimension of the browser window!!! Argggghhhhhhhhhhh..........!!!!! (rahhhh!)

You see with the JavaScript method you can specify to include each specific feature or not (see the tool bar feature in the above code). So the best thing I can do is to assume what is in a standard window (of course following a qualified reference i.e. MSDN window.open() ). Base on what is described as the default, I will enable / disable the features when I open up the window via JavaScript.

Of course this is NOT really a solution as I'm only assuming what most client's browser looks like. They can well of course remove the status bar from their browser, which in this case my pop up browser window will not follow. I don't think there are any solutions to my problem right now (which of course is a minor problem)......but perhaps one day when they do improve the HTML spec or JavaScript.....something will be offered in the future for this!

To read more:
pop-up, pop-under windows
Opening a Window

Wednesday, 24 October 2007

A Site that will Help Save Your Day at Work

Just something for fun : P Something you can do while you are bored to death at work waiting for systems to build, code to compile, applications to open up.....or simply to get out of any problems at all.....

Recently in one of my company's blog there was a post recommending this site:
http://www.cashto.net

hehe you should feel happier about your day at work looking at this site hahaha!!! hehe give it a try! : P

P.S. - It always make me sad to see my friends looking so dead after a day of work / to know that they had to do a SUPER OT or worked their butt off to finish off work stuff!!! And the thing is I can't help them but can only sit and listen and mentally support them.

I guess it make me feel more upsetting because luckily I haven't had the need to go so crazily over board in my current job....seriously I certainly do feel quite fortunate with my current job and I am very thankful too!!! hehe lucky!!!

Anyway I hope this website will at least help all you BUSY people out there (incl anyone who moans about their work, who are stuck OT-ing....or for whatever reason you are having a bad day at work)! Hope this will help CHEER U UP! hahaha : ) ENJOY and stay HAPPY!