Mike Urievich's blog

JavaScript: Select With Filtration

A SELECT tag with hundreds options deserves some filtration. Let’s have an extra INPUT to filter the SELECT options by label while the user is typing in. The problem: in Internet Explorer, changing 1000+ SELECT options on the fly is extremely slow... Read further for a solution.

HTML: How to Disable the Submit Button After Submit

Solution

<script type="text/javascript">
	function disableFormElements(form){
		setTimeout(function(){
			for (var i=0; i<form.elements.length; i++) 
			    form.elements[i].disabled = true;
		}, 1);
	}	
 
<form name="formName" action="page.xsp?p1=1&p2=2" method="post" 
onsubmit="if (!ClientValidation()) return false; disableFormElements(this)">

Read further for the explanation.

HTML5: Handle With Care

You obviously have met a “Read Carefully” section in virtually any agreement or proposal—whether they were printed or on-line. Despite the appeal, this part is intentionally made unreadable using ALL CAPS or tiny font. Why? It doesn’t that matter as soon as all goes well, but any non-standard move welcomes you to the “Read Carefully” trap – you lost. HTML5 has comprehensive overviews, tutorials, but misses that so vital section. In this article I’ll try to fill in this gap.

in

Auto resizable spark TextArea (Flex 4).

Creating auto resizable components is a typical and often not a hard task for developer. But there are some problems with TextArea. TextArea automatically displays scrollers when content is too large. The main suggestion in the internet on how to fix it is to add handlers on textChange event and resize TextArea by number of text lines. But it requires manual work every time you use TextArea, so this approach is not optimal. But there is a way to reskin TextArea to obtain autoresize, this way you’ll just need to apply this skin instead of default (or inherit from TextArea and make this new skin default).

Syndicate content