Tuesday, February 26, 2013
Tip: Close an IE popup properly.
In order to close an IE popup that is opened through the window.open function, one has to use the following code:
Assume that before closing the popup, we need to update the parent window by calling a javascript function. The declaration of the button that closes the popup:
<input id="btn" onclick="opener.callParentFunction(params); window.close(); return false;" type="button" value="Close Me" />
Please note that the javascript statement in the button must contain the "return false" statement or else IE will not respond to the close command.
Wednesday, January 9, 2013
Tip: JavaScript getTime cannot guarantee unique numbers generation.
Recently i have been working on a project that uses JavaScript to generate unique identifiers based on the number of items selected by a user. A loop will go through the selected items and use the getTime function to generate an id for each item. Problems could occur when things run on a fast machine, 2 same ids can be used if the difference between the 2 loops are split micro seconds only.
The workaround i used is to store the generated ids and compare it with the newly generated id to ensure that the new id is not already used.
Another alternative is to use an incremental number in a loop and create a way to keep track it.
Monday, March 5, 2012
Tip: MS Web Based Report Viewer Showing Blank Screen
If you are encountering problem with blank report, please make sure that all the report's input parameters are defined in your code, i.e. where you've written logic to populate the report. The problem that I faced was I forgotten to fill in one of the parameters and it cost me few hours to find out.
Tip: Migrate Your Source Code to a New Team Foundation Server 2010
Original Source Control: Team Foundation Server 2010
New Source Control: Team Foundation Server 2010
The easiest way to move your source code from one server to another one is to rename your source code directory with a new name, then try to add the entire solution from within Visual studio 2010 by right clicking the solution, click "Add to Source Control...", and select the new TFS server.
This method can eliminate the problem of your code that still referencing the old TFS server, which is quite annoying.
New Source Control: Team Foundation Server 2010
The easiest way to move your source code from one server to another one is to rename your source code directory with a new name, then try to add the entire solution from within Visual studio 2010 by right clicking the solution, click "Add to Source Control...", and select the new TFS server.
This method can eliminate the problem of your code that still referencing the old TFS server, which is quite annoying.
Thursday, December 1, 2011
Tip: Installing Chinese Font and Input Into BlackBerry Bold 9700
It's really frustrating when actually looks into the Google and found out that the only way to install a new language and input methods into your BlackBerry phone is to get it from your wireless Internet Provider when you already have a different OS version installed. There are 2 ways that we can install the extra language packs into the phone.
1. Wipe the entire BlackBerry phone using JL_Cmder and reinstall the OS that contains the language pack that you require.
2. Use the BBSAK(BlackBerry Swiss Army Knife) without have to wipe out your phone.
Based on the available option it's obvious that i go for option 2 which is easy and safe (if you use it properly).BBSAK offers you a comprehensive set of actions that you can use to install language files. The Chinese language files you can download from this link http://www.filesonic.com/file/4055912284/Chinese_Pinyin_Input_OS_6_Qwerty.rar, which i got from http://forums.crackberry.com/leaked-beta-os-f95/bold-9700-os6-6-0-0-344-east-asian-language-support-545822/
Follow the following instruction when using BBSAK:
1. Download and install BBSAK
2. Extract the language files to any folder.
3. Open up the BBSAK and go to "Modify CODs" tab.
4. Click on "Install CODs" and select all the language files that you want to install.
5. Click Ok and you are done. I tested it using the iSpeech application that used to show black boxes before i installed the language files, and here's the result.
1. Wipe the entire BlackBerry phone using JL_Cmder and reinstall the OS that contains the language pack that you require.
2. Use the BBSAK(BlackBerry Swiss Army Knife) without have to wipe out your phone.
Based on the available option it's obvious that i go for option 2 which is easy and safe (if you use it properly).BBSAK offers you a comprehensive set of actions that you can use to install language files. The Chinese language files you can download from this link http://www.filesonic.com/file/4055912284/Chinese_Pinyin_Input_OS_6_Qwerty.rar, which i got from http://forums.crackberry.com/leaked-beta-os-f95/bold-9700-os6-6-0-0-344-east-asian-language-support-545822/
Follow the following instruction when using BBSAK:
1. Download and install BBSAK
2. Extract the language files to any folder.
3. Open up the BBSAK and go to "Modify CODs" tab.
4. Click on "Install CODs" and select all the language files that you want to install.
5. Click Ok and you are done. I tested it using the iSpeech application that used to show black boxes before i installed the language files, and here's the result.
Monday, October 31, 2011
Tip: Missing Report Viewer 2008 Component: Could not load file or assembly 'Microsoft.ReportViewer.WebForms
You will get this error if you did not install the MS Report Viewer 2008.

So get one from Microsoft and install it.
Microsoft Report Viewer Redistributable 2008
So get one from Microsoft and install it.
Microsoft Report Viewer Redistributable 2008
Tuesday, July 26, 2011
Tip: Chilkat Email Component not working in my brand new server
Anyone who is using the Chilkat Email component will realize that it does not work in a brand new server with a 64-bit OS, without the C++ runtime library insalled. The Chilkat component is built using generic C++ code, so by just installing .NET FW is not good enough.
The C++ runtime can be downloaded from the following Microsoft web site.
http://www.microsoft.com/download/en/details.aspx?id=5555
The C++ runtime can be downloaded from the following Microsoft web site.
http://www.microsoft.com/download/en/details.aspx?id=5555
Subscribe to:
Posts (Atom)