help

jquery ui modal dialog on ie6

Posted on August 30, 2009
No Comments

I use jQuery UI modal dialog for my recent project, and the client is very detail about browser compatibility, especially about IE6. I believe if you’ve played around with IE6, you would notice some irritating behavior, and in this case with modal dialog is that sometimes the combo box still appears on top of the modal dialog. If I’m not mistaken you could search on google about “IE6 active-x bleed through” for details of why this thing happen on IE6.

I’ve a workaround for this IE6 active-x bleed through with jQuery UI modal dialog, I got the idea from other modal dialog that has fix this issue, they are using dummy iframe to cover the page, so other active-x (in this case, combo box) will be hidden behind this iframe, while the modal dialog sits on top of the dummy iframe.

basically i just add this iframe on the part of jQUery UI modal dialog  where it adds a layer div for background, plus additional checking for IE6 browser.

<iframe class=\”ui-widget-overlay\” src=\”javascript:false;document.write(”);\” style=\”opacity: 0; width: 100%; height: 100%;z-index:-1;\”/><p style=\”width: 100%; height: 100%;\”/>

var d=c(“<div></div>”).appendTo(document.body).addClass(“ui-widget-overlay”).css({width:this.width(), height:this.height()});

so it will be:

if(c.browser.msie&&c.browser.version<7){var d=c(“<div><iframe class=\”ui-widget-overlay\” src=\”javascript:false;document.write(”);\” style=\”opacity: 0; width: 100%; height: 100%;z-index:-1;\”/><p style=\”width: 100%; height: 100%;\”/></div>”).appendTo(document.body).addClass(“ui-widget-overlay”).css({width:this.width(),height:this.height()});}else{var d=c(“<div></div>”).appendTo(document.body).addClass(“ui-widget-overlay”).css({width:this.width(),height:this.height()});}

you can download the modified jquery ui modal dialog code here.
(note that this is only jquery ui modal dialog, it will need ui.core.js, ui.draggable.js, and ui.resizable.js. You can download the complete jquery ui framework from http://jqueryui.com/)

Tags: , , , , , ,

preparing for the rain!

Posted on August 21, 2009
1 Comment

I have two short stories to share today, one is about a farmer, and one is about a swimmer lost in the sea. enjoy!

farmer story:

once upon a time, there was this two neighboring farmers. They are both an experienced farmers, and this year has been a tough one for them. They need to plant soon in order to survive, but there was a long drought season in a country. They know well that with this kind of season, they cannot start to plant, nevertheless since both of them are Christian, so they prayed for rain. One farmer prays for rain, and he is waiting for the rain to fall, he is anxiously waiting for the answered prayer, every morning he goes out of his house to see the sky looking for clouds, but seeing no clouds, he goes back to his house disappointed. The other farmer also prays for rain, and every morning he goes out of his house to see the sky, looking for the long awaited clouds, seeing none, but instead disappointed, he goes out to his field and prepare his field for rain, he believe, as he prays, that rain will come, soon!

Swimmer story:

there was this swimmer who was lost in the sea, he kept trying to go to the beach, but despite his best effort, he still could not defeat those big waves that keeps pushing him to the middle of the sea. 3 washes later he got knocked out, and when he eventually gain his focus, he is lost in the middle of an ocean already. He could not figure out which way is the nearest land. So he pick one direction and give his best to swim to that direction. While trying to get to a safe land, He pray to God for help. He did meet with 3 boat, 1 is a fisherman boat, that is only able to carry the fisherman and his catches, the fisherman is willing to let go of his catches in order to rescue this swimmer, but the swimmer refuses and said that his God will help him. The second boat is a pirate boat, but seeing the crew, the swimmer is afraid and refuses to get into the boat, he said that his God will help him. He keeps praying to God for help, and finally comes a boat, but inside the boat was his biggest enemy, his life time rival. The swimmer refuses also to go inside the boat, he doesn’t want to be save by his enemy. After those 3 boats, the swimmer finally gave up, and drown. When he finally died, he met God and ask, “Lord, why didn’t u sent for help and save me?”. God said, “I did! remember those 3 boats I sent you?!”

I’m sure y’all have heard this two stories before, but I believe just reading those 2 stories will refresh ur day, and give you strength to carry on your day! have faith, He is never too late!

prepare for the rain!

Tags: , , , , , , , , , , , , ,

how did you make your first million

Posted on August 13, 2009
1 Comment

this story is about a person sharing his experience on how he gain his first million, taken from forum at salary.sg, read the full story here.

- How did you make your first million?

Made my first million i think around 30 or 31 years old. Graduated from uni in 1999, started own business in 2000 and have been running it for 9 years now. Am 34 this year. My family saves a lot. We save about 80% of total annual income.

- How long did you take?

About 6 years to make the 1st. 2 years for 2 second and 1 year for third. Make about 1M per year now. Probably can increase it to 2M per year over the next 5 years. It is very true that the 1st is hardest to make and the subsequent easier.

- If you were to do it again in today’s context, how much time do you need? Would you do it differently and how?

Well, i make my money mostly from company profits and pay. My 1st company took 5 years to hit 1 M turnover, my 2nd company took 1 year. Experience, a good team and knowhow really helps. I will still spend time, money and effort in business with stock trading as a fun sideline.

Investments I enjoy trading stocks but i never trade with more than 200-300K cash.No margin also. Money is hard to earn. This downturn made about 120K buying at low from last Sep to this year Mar. Over the past 9 years probably made about $250K in stocks. My idea is to use stock gains to pay for lux items. Stuff like gifts for wife/kids and travel.

- If I want to be rich, what’s your advice for me?

Make sure you have the right drive and temprament for it. And you need to be in the right area. Traders, Lawyers, Med Specialists, Sales, Consultants, Investment Bankers are the right group that can make $1M by 35 to 40. If you want by 30 I think have to be businessman or sales/middleman work

- What is the most important lesson you picked up in the process of getting rich?

I do not see myself as rich yet. It is very interesting that as you accumulate wealth you get exposed to even wealthier people and know more. Eg. I used to think I can retire with 3M net worth. Now with that, I feel might as well aim higher and go for 10M and I can picture a lifestyle requiring that. I suspect when I hit 10M, it will become 20M. So there is this slippery slope of greed which I persoanlly want to be aware of. Money is for spendign and making people around me happy, it is a means to an end and I need to keep reminding myself of it.

- What do you think is the most important habit that helped you?

Persistance & a drive to make things work no matter what. It helps in business a lot.

- Any missed opportunities? Can I make use of these opportunities?

Erm…. there are always opportunities. If viewed that way, then i have “missed” many many.

- I want to add one more question: Do you think luck plays a part?

Yes, we can try all we want but we need a little right place right time. But u need to work hard and be prepared to take some risk and take the challenge when it presents itself.

Hope this helps our readers. I write because I benchmark myself a lot personally and it makes me very competitive as a person. So for those of u who like to benchmark, this story is for you!

Tags: , , , , , , , , , ,

father’s love letter

Posted on July 30, 2009
1 Comment

this video is taken from: http://www.fathersloveletter.com/

 

click here to show/hide full narration

Tags: , , , , , , , , , , , , , , ,