What I want to do is when a user clicks something:
<div id="FormContainer">
<form>
...
</form>
</div>
<a href="#" onClick="FlashElement()">Make it flash</a>
It briefly flashes a rectangle around the form within the FormContainer. Is there any way I can achieve this?
A quick and simple way would be to draw a colored border then remove it after a short period:
If you want a repeated flashing effect then you could make several calls to “setTimeout” to hide/show the border at the desired interval, e.g.: