Solved

problem in jquery jconfirm alert

Posted on 2011-02-14
8
2,264 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

623 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