Solved

problem in jquery jconfirm alert

Posted on 2011-02-14
8
2,217 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
  • 4
  • 4
8 Comments
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
Just to clarify what type of
Button is the 'ok'?
0
 

Author Comment

by:Shahid-Abbasi
Comment Utility
It’s a default OK button of JConfirm.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
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
Comment Utility
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
Comment Utility
my own efforts
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now