commedo's blogger

Wednesday, October 27, 2004

[PROGRAMMING TIPS] How to trigger select action while clicking a label

You need the following HTML code to make this work:









This code works for IE and Mozilla (FireFox) --> Tested.

Tuesday, October 19, 2004

[PROGRAMMING TIPS] Browser-Compatibility while accessing HTML element using DOM

Please notice that MSIE accesses an HTML element using attribute ID, but Mozilla not. Mozilla uses attribute NAME instead of ID. So, you just simply write both attributes to make it work. See the following example:

<span id="var_name" name="var_name"></span></span>

Wednesday, September 01, 2004

[PROGRAMMING TIPS] Compilation Option for MSVC 2000 (v6)

Having problem with application (unhandled exception) run on MS Windows 2000/XP/2003?

One of the solution key is using default option (Project Settings > tab C++) while compiling application or DLL using MSVC.
DO NOT use Maximize speed nor Minimize size options to compile because these options are causing any exception handling codes such as try...catch, pretend not to be executed properly, and then system will generate error.

You may simply try compiling the following code using compile options (default, maximize speed, minimize size) and compare the execution results:


#include <stdio.h>
#include <string.h>

int main ()
{
char* c;
try {
printf("test core dump\n");
strcpy(NULL, NULL);
} catch (...) {
printf("YUPI, core dump\n");
}
return 0;
}

Reference:
Yusron Hilmy