Archive for December, 2013

Dec
31

IE 10 still doesn’t support “onchange” event in HTML5!

HTML5 has a lot of nice feature, but the cross browser support is still not so ideally.

Just like:

If you want to disable the fields in a “fieldset” and dynamically enable them when some condition is met, the best way is to use a radio button or a checkbox.

You can add a “disabled” attribute on the nested fieldset elements, and use “onchange” event on the radio button or checkbox to controll the “disabled” attribute.

But it still doesn’t work in IE 10!!!

The following code works under chrome and firefox perfectly but not IE:

<form>
    <fieldset>
        <legend>Store Credit Card</legend>
        <p><label>Name displayed on your card:<input name="fullName"
            required></label></p>
        <fieldset name="accountNum" disabled>
            <legend>
                <label>
                    <input type="radio" name="accountType"
                           onchange="form.accountNum.disabled = !checked;
                           form.accountLetters.disabled=checked">My account is a
                           12-digit number
                </label>
            </legend>
            <p><label>Store card number: <input name="cardNum"
                required></label></p>
        </fieldset>
        <fieldset name="accountLetters" disabled>
            <legend>
                <label>
                    <input type="radio" name="accountType"
                           onchange="form.accountLetters.disabled = !checked;
                           form.accountNum.disabled=checked">My account includes
                           letters and numbers
                </label>
            </legend>
            <p><label>Store card code: <input name="cardLetters"></label></p>
        </fieldset>
    </fieldset>
</form>
Dec
24

How to make your website speak?

You can make your website or blog speak without any complicated technology. The easiest way is to use the tts-cloud service, but the most tts cloud services are costly. I tried a lot of them, at the end I found the VoiceRSS is really excellent and free for normal users.

Steps:

1. go toΒ http://www.voicerss.org

2. register a free account

3. get the API key

4. read the API

5. put the code in your blog πŸ˜€

6. finish! πŸ˜€


Voice RSS - Free online text-to-speech service

Dec
10

set security level in java control panel

Some times you might face the problem that java application can not be allowed to run in your webbrowser:

Error Message: Application Blocked, Your security settings have blocked a local application from runing.

Application Blocked

What can you do at this time?

Just go to java control panel and then set the security level.

Win key+W -> search “java” -> set your desired security level.

java_control_panel