Results 1 to 5 of 5

Thread: Focus function not working without alert

Threaded View

  1. #1
    Join Date
    Dec 2006

    Thumbs down Focus function not working without alert

    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

    $$('#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..

    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?

    Last edited by joboy; 04-19-2010 at 10:34 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles