JQDialog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JQDialog

Ramiro Diaz Trepat-2
Hi
I am a complete n00b in terms of ajax / jQuery and I have a couple of basic questions:

I have created a simple dialog using code similar to the one provided in the example:

html div id: 'dialog'; title: 'New Simulation';
script: (html jQuery new dialog
     title: 'New Simulation';
width: 600;
   autoOpen: false;
addButton: 'Done' do: html jQuery new dialog close;
   addButton: 'Close' do: html jQuery new dialog close);
with: [ ... ]


I see that JQ widgets do not implement the #callback: method, hence I don't quite know how to process things in case someone presses the 'Done' button above.

Also as one of the results of the user pressing 'Done' I want to alter the contents of a select list, to which I would like to add another element.  I couldn't find examples of this kind of form component alterations, I don't know if it is even possible or not.

Cheers


r

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: JQDialog

Lukas Renggli
2009/12/9 Ramiro Diaz Trepat <[hidden email]>:

> Hi
> I am a complete n00b in terms of ajax / jQuery and I have a couple of basic
> questions:
> I have created a simple dialog using code similar to the one provided in the
> example:
> html div id: 'dialog'; title: 'New Simulation';
> script: (html jQuery new dialog
>      title: 'New Simulation';
> width: 600;
>    autoOpen: false;
> addButton: 'Done' do: html jQuery new dialog close;
>    addButton: 'Close' do: html jQuery new dialog close);
> with: [ ... ]
>
> I see that JQ widgets do not implement the #callback: method, hence I don't
> quite know how to process things in case someone presses the 'Done' button
> above.

Normally you attach AJAX actions to the event (which can have and
trigger all kinds of callbacks), but you can also do other things:

    addButton: 'Done' do: (html jQuery ajax ...) , (html jQuery new
dialog close);

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside