L?KE
26-11-2008, 08:01 PM
I've got this JS function for my forms when they are focused on and off. Say I fiddle with it, and change function names or whatever is it logical to change:
<input type="text" name="text" value="Text Input" class="normal" onFocus="focusIN(this)" onBlur="blurIN(this)" />
to:
<?php
$do = "onFocus=\"focusIN(this)\" onBlur=\"blurIN(this)\"";
?>
<input type="text" name="text" value="Text Input" class="normal" <?= $do ?> />
..?
Or is there an easier way of doing so, or should I just not bother :P
(Baring in mind that it will be used for more than one form item)
<input type="text" name="text" value="Text Input" class="normal" onFocus="focusIN(this)" onBlur="blurIN(this)" />
to:
<?php
$do = "onFocus=\"focusIN(this)\" onBlur=\"blurIN(this)\"";
?>
<input type="text" name="text" value="Text Input" class="normal" <?= $do ?> />
..?
Or is there an easier way of doing so, or should I just not bother :P
(Baring in mind that it will be used for more than one form item)