Loading ...
Sorry, an error occurred while loading the content.
 

Help : issue managing focus() behaviour while using simple dialog

Expand Messages
  • anilnamde
    Hi I have replaced the window alert with window.alert = newAlert() Using this is suppressed the browsers alert box and used SimpleDialog to work instead with
    Message 1 of 1 , Aug 6, 2009
      Hi

      I have replaced the window alert with window.alert = newAlert()
      Using this is suppressed the browsers alert box and used SimpleDialog to work instead with modal property set to true.

      now following are the main issue i have found

      1. In javascript we use form validations like
      if(field.value = ""){
      alert('field is requiered')
      field.focus()
      }
      however using the SimpleDialog i found that focus() is not set for the control.

      Workaround i have tried is to watch which elemnent has focus before the alert is shown and on hideMaskEvent setback the focus. However 2. spoiled this idea and dragged the issue even further.

      2. modality hides the select/dropdown elements so again issues occur for the IE.

      3. When browsers Alert occur it is able to prevent even the redirection untill user press ok/close button. but using YUI alert is not capable of doing so. Is there any way to achive same behaviour for the this. [following is code for which this issue gets fired]
      if(some condition){
      alert('This messages does not wait for user click on UI and submit gets executed causing message like almost not appeard on UI')
      form.submit() / location.href = 'some url'
      }


      Please suggest some good solution.
      Thanks.
    Your message has been successfully submitted and would be delivered to recipients shortly.