0

When I double click a option, it will execute javascript function.
Testing on iphone safari, it just pops out a select menu list.

Can't execute javascript function.

How to I fix this?

<select name="EmployeeID" size="5" class="bar" id="EmployeeID" style="width:80%" 
        scrolling="yes" 
        ondblclick="insertOption('FlowGo',this.options[this.selectedIndex].text,this.opt‌​ions[this.selectedIndex].value);putValue('FlowGo')"
>
    <option value="0">----choose----</option>
</select>
Alex Tartan
  • 6,465
  • 10
  • 33
  • 41
  • Welcome to S.O, can you paste your code? – mmativ Mar 18 '16 at 01:45
  • thanks. it just like this below: `` – shihminciou Mar 18 '16 at 01:46
  • You should edit your question and add the code there, instead of in a comment. That way you can format it and people can read it more easily. – Theresa Mar 18 '16 at 01:50
  • Possible duplicate of [Detect double tap on ipad or iphone screen using javascript](http://stackoverflow.com/questions/8825144/detect-double-tap-on-ipad-or-iphone-screen-using-javascript) – Claudio King Mar 18 '16 at 07:54

1 Answers1

0

Click events are handled differently on tablets and phones because they are considered "tap" events. jQuery, if I remember correctly, treats them the same as far as single clicks, but double tap events are not included.

You may need to use jQuery plus a plugin called doubletap.js.

Dexter
  • 731
  • 2
  • 12
  • 27