[Seaside] Jquery dialog open vs. Chrome

Nick Ager nick.ager at gmail.com
Tue May 10 07:14:32 UTC 2011


Hi Thierry,

I tried your code and it works for me on FF (4.0.1) and Chrome (11.0.696.65)
Mac. Have you added the JQuery libraries JQuery, JQueryUI and a JQueryTheme
to your application?

Have you used the developer tools in FF (Firebug) and Chrome
(View->Developer->Developer Tools) to see if the browser is reporting any
errors?

One thing I noticed is that the #html: method on your dialog object causes
Seaside to make an ajax request for the dialog content when you click on the
anchor. An alternative is for the content to be rendered during page load,
but remain invisible until the dialog is opened. To achieve this you add -
autoOpen: false - and render the component using the div's #with:

html div
       id: (html nextId);
       script: (html jQuery new dialog
               title: 'Title';
               height: 200;
               width: 400;
autoOpen: false;
                resizable: false;
                modal: true);
with: aComponent.

html anchor
       onClick: (( html jQuery id: html lastId) dialog open);
             with: 'Test'.

Perhaps the problem is with the component, try removing the component and
testing with simple html in the dialog:

html div
       id: (html nextId);
       script: (html jQuery new dialog
               html: [ :r | r text: 'hello dialog'];
               title: 'Title';
               height: 200;
               width: 400;
               resizable: false;
               modal: true).

html anchor
       onClick: (( html jQuery id: html lastId) dialog open);
             with: 'Test'.

Or even simpler:

html div
       id: (html nextId);
       script: (html jQuery new dialog
               title: 'Title';
               height: 200;
               width: 400;
               resizable: false;
               modal: true;
               autoOpen: false);
        with: 'hello dialog'.

html anchor
       onClick: (( html jQuery id: html lastId) dialog open);
             with: 'Test'.

Hope this helps

Nick

On 10 May 2011 05:10, Thierry Thelliez <thierry.thelliez.tech at gmail.com>wrote:

> Hello,
>
> While creating a dialog with JQuery, I found that the following code
> works with FF, but not with Chrome. Under the later, nothing happens
> when clicking the 'Test' link.
>
> html div
>        id: (id := html nextId);
>        script: (html jQuery new dialog
>                        html: aComponent;
>                        title: 'Title';
>                height: 200;
>                width: 400;
>                        resizable: false;
>                        modal: true).
>
> html anchor
>        onClick: (( html jQuery id: id) dialog open);
>              with: 'Test'.
>
>
> If I replace the anchor with a submitButton, the dialog works fine in
> the two browsers. Adding a fake url like 'url: '#'' did not help (it
> did help getting the right cursor type).
>
> Any suggestions?
> Thanks,
> Thierry
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110510/003def0a/attachment.htm


More information about the seaside mailing list