This JS code is on RoR+ImgMap site.
I’ve tweak several portion of [URL=”http://code.google.com/p/imgmap/”]ImgMap
[CODE]
$$(‘#img_area_’+this.currentid.toString()+’ .img_href’).first().focus();
alert(‘Click here’);
as replacement to..
[CODE]this.addNewArea();
so that when the user draws a shape, the focus will be set to the respective href field, instead of the default behavior – adding new row(imgmap form).
but for brevity let me just simply the code..
[QUOTE]
$(‘elem_id’).focus();
alert(‘Click here’);
If i’ll removed alert function, focus() won’t do its job.
Alert is really disturbing.. can anyone explain why this is happening?
Thanks.