Recently I have encountered strange issue. Every time I press "enter" key in to the textbox of opened dialogbox it opens up new browser window.
I even tried putting below code on onKeyPress event, but it didn't work.
var charCode = (evt.which) ? evt.which : event.keyCode
if(charCode == 13){
event.cancelBubble=true
return false;
}
finally after long research on Google, I came across where I found that the reason this was happening is because if Dialogbox has only one textbox then it automatically tries to submit the form, so in my case in dialogbox it was opening new window while trying to submit the form. Resolution I found from above site was to put another textbox, weather its visible or hidden its not a problem.
so if this happens in your dialogbox just add below code
<INPUT type="text" style="VISIBILITY: hidden;POSITION: absolute">
No comments:
Post a Comment