Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

problem in jquery jconfirm alert

Posted on 2011-02-14
8
Medium Priority
?
2,289 Views
Last Modified: 2012-05-11
Hi i am facing a problem after using jquery jconfirm alert. Issue is that after receiving confirm alert, when user press tab to go on Cancel button and press Enter key there, despite of firing event of Cancel button, it fires the event of OK button. this issue is not produced when user press the cancel button by mouse. Waiting for your replies.
0
Comment
Question by:Shahid-Abbasi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 43

Expert Comment

by:Rob
ID: 34894366
that is because the default button for the form is the OK button.  Not sure if you can but change the OK button from type='submit' to type='button'  you might have to add onclick='this.form.submit()'
0
 

Author Comment

by:Shahid-Abbasi
ID: 34894491
Hi

I think you did not got my point. Basically i am using jquery jconfirm alert. After confirm alert when you press tab to go on 'Cancel' button and press 'Enter' there then despite firing cancel event it fires 'Ok' button event, which is wrong. In my opinion this is the bug of jconfirm alert but i am not sure about that. You can also check this behaviour on this link. Press 'Show Confirm' button to dispaly confirm alert.

http://labs.abeautifulsite.net/projects/js/jquery/alerts/demo/
0
 
LVL 43

Expert Comment

by:Rob
ID: 34894574
Just to clarify what type of
Button is the 'ok'?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:Shahid-Abbasi
ID: 34895379
It’s a default OK button of JConfirm.
0
 
LVL 43

Expert Comment

by:Rob
ID: 34900983
Are you able to change it so that it isn't the default button,  also if you inspect the button at runtime what type of button is it?  what i'm getting at is if it is type='submit' then pressing enter anywhere in the JConfirm box will be liike pressing the OK button.

The only thing I can think of is that you test if the cancel button has focus when the OK button's onclick ev
0
 
LVL 43

Expert Comment

by:Rob
ID: 34900987
The only thing I can think of is that you test if the cancel button has focus when the OK button's onclick event is pressed
0
 

Accepted Solution

by:
Shahid-Abbasi earned 0 total points
ID: 35024409
ok my issue has been solved i add an event in cancel button
in "jquery.alerts.js" file

onkeypress="javascript:$.alerts._hide();"
0
 

Author Closing Comment

by:Shahid-Abbasi
ID: 35067594
my own efforts
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question