This JS code is on RoR+ImgMap site.
I've tweak several portion of ImgMap, specifically around line 2205 of the file imgmap.js by adding this code
Code:
$$('#img_area_'+this.currentid.toString()+' .img_href').first().focus();
alert('Click here');
as replacement to..
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..
$('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.
Bookmarks