You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by skatz <sk...@enpocket.com> on 2007/10/05 06:27:42 UTC

ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

I am trying to use the ModalWindow as a confirmation dialog and it works fine
on one page but the same code on a different page produces the above error.

Closing the ModalWindow with the X in the corner work fine.  The error
occurs when the AjaxCallbackLink onClick handler calls ModalWindow.close(); 
On the page that isn't working the following code is called as the last
thing in the page constructor.

        // The delete dialog
        ModalWindow deleteDialog = new ModalWindow("deleteDialog");
        mConfirmationPanel = new
ConfirmationPanel(deleteDialog.getContentId(), new
WUIResourceModel(CampaignManagerPage.class, "deleteDialogQuestion"), this,
deleteDialog);
        deleteDialog.setContent(mConfirmationPanel);
        deleteDialog.setInitialWidth(260);
        deleteDialog.setInitialHeight(80);
        deleteDialog.setResizable(false);
        deleteDialog.setTitle("Delete Campaign(s) Confirmation");
        deleteDialog.setWindowClosedCallback(
            new ModalWindow.WindowClosedCallback() {
                private static final long serialVersionUID = 1L;
                public void onClose(AjaxRequestTarget pRequestTarget) {
                         ...
                        }
                    }
                }
            }
        );
        add(deleteDialog);

Any ideas?
-- 
View this message in context: http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13053366
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

Posted by Eelco Hillenius <ee...@gmail.com>.
Please open an issue in JIRA if you have this reproducible.

Eelco

On 10/5/07, skatz <sk...@enpocket.com> wrote:
>
> More information.  It works as expected in IE7.  The problem occurs with
> Firefox 2.0.0.7
>
> skatz wrote:
> >
> > I am trying to use the ModalWindow as a confirmation dialog and it works
> > fine on one page but the same code on a different page produces the above
> > error.
> >
> > Closing the ModalWindow with the X in the corner work fine.  The error
> > occurs when the AjaxCallbackLink onClick handler calls
> > ModalWindow.close();  On the page that isn't working the following code is
> > called as the last thing in the page constructor.
> >
> >         // The delete dialog
> >         ModalWindow deleteDialog = new ModalWindow("deleteDialog");
> >         mConfirmationPanel = new
> > ConfirmationPanel(deleteDialog.getContentId(), new
> > WUIResourceModel(CampaignManagerPage.class, "deleteDialogQuestion"), this,
> > deleteDialog);
> >         deleteDialog.setContent(mConfirmationPanel);
> >         deleteDialog.setInitialWidth(260);
> >         deleteDialog.setInitialHeight(80);
> >         deleteDialog.setResizable(false);
> >         deleteDialog.setTitle("Delete Campaign(s) Confirmation");
> >         deleteDialog.setWindowClosedCallback(
> >             new ModalWindow.WindowClosedCallback() {
> >                 private static final long serialVersionUID = 1L;
> >                 public void onClose(AjaxRequestTarget pRequestTarget) {
> >                          ...
> >                         }
> >                     }
> >                 }
> >             }
> >         );
> >         add(deleteDialog);
> >
> > Any ideas?
> >
>
> --
> View this message in context: http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13058356
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ModalWindow.close() results in ERROR: Exception evaluating javascript: TypeError: window.parent.setTimeout is not a function

Posted by skatz <sk...@enpocket.com>.
More information.  It works as expected in IE7.  The problem occurs with
Firefox 2.0.0.7

skatz wrote:
> 
> I am trying to use the ModalWindow as a confirmation dialog and it works
> fine on one page but the same code on a different page produces the above
> error.
> 
> Closing the ModalWindow with the X in the corner work fine.  The error
> occurs when the AjaxCallbackLink onClick handler calls
> ModalWindow.close();  On the page that isn't working the following code is
> called as the last thing in the page constructor.
> 
>         // The delete dialog
>         ModalWindow deleteDialog = new ModalWindow("deleteDialog");
>         mConfirmationPanel = new
> ConfirmationPanel(deleteDialog.getContentId(), new
> WUIResourceModel(CampaignManagerPage.class, "deleteDialogQuestion"), this,
> deleteDialog);
>         deleteDialog.setContent(mConfirmationPanel);
>         deleteDialog.setInitialWidth(260);
>         deleteDialog.setInitialHeight(80);
>         deleteDialog.setResizable(false);
>         deleteDialog.setTitle("Delete Campaign(s) Confirmation");
>         deleteDialog.setWindowClosedCallback(
>             new ModalWindow.WindowClosedCallback() {
>                 private static final long serialVersionUID = 1L;
>                 public void onClose(AjaxRequestTarget pRequestTarget) {
>                          ...
>                         }
>                     }
>                 }
>             }
>         );
>         add(deleteDialog);
> 
> Any ideas?
> 

-- 
View this message in context: http://www.nabble.com/ModalWindow.close%28%29-results-in-ERROR%3A-Exception-evaluating-javascript%3A-TypeError%3A-window.parent.setTimeout-is-not-a-function-tf4573096.html#a13058356
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org