This is a migrated thread and some comments may be shown as answers.

anchor button fires twice

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hamad
Top achievements
Rank 1
Hamad asked on 07 Oct 2013, 10:39 AM
Hello
anchor button click fires twice, here is my code

1.<div data-role="view" id="drawer-company" data-layout="drawer-layout" data-title="Company">
2.    <header data-role="header">
3.        <div data-role="navbar">
4.            <a data-role="button" data-align="right" data-click="UpdateCompanyDetails_Click">Update</a>
5.        </div>
6.    </header>
7.</div>


1.function UpdateCompanyDetails_Click(e) {
2.    e.preventDefault();
3.    alert("Updated");
4.    return false;
5.}
Regards

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 08 Oct 2013, 10:43 AM
Hi Hamad,

I have tested this on a iOS and Android devices and it does not seem to be fired twice. I guess that you are testing this code in Internet Explorer where the alert is fired twice, but this is caused by a specific functionality in the browser and it is valid only for alerts or dialog boxes. Test it with console.log() for example to see the difference.
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Hamad
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or