[Seaside] jQuery dialog question

Louis LaBrunda Lou at Keystone-Software.com
Tue May 25 21:35:14 UTC 2021


Hi Paul,

Thanks for the post.  I solved it.  I had to add another #onClick: 'return false'.

Lou

FYI, somehow adding #bePush broke the imageButton (changed it to a regular button).


On Mon, 24 May 2021 21:14:25 -0500 (CDT), Paul DeBruicker <pdebruic at gmail.com> wrote:

>For your imageButton code you can add a #bePush to ensure the "submit"
>behavior is ignored.  
>
>If its not part of a form would it refresh the page if it is "submitting" ? 
>I'm not sure.  
>
>When you click it what network events are logged in the browser? 

>
>Louis LaBrunda wrote
>> Hi Jupiter,
>> 
>> Jupiter Jones <
>
>> jupiter.jones@
>
>> > posted this:
>> 
>> I may be wrong, but isn?t an imageButton a kind of submitButton - setting
>> the url: would follow that link.
>> 
>> So clicking the button would open the dialog, then replace the page with
>> "theSession helpUrl"
>> 
>> I?m not in a position to test this at the moment, but remove the url:
>> setting on the image button and see what happens.
>> 
>> Forgive me for replying to your reply this way but for some reason I
>> couldn't reply in the normal way.
>> 
>> Yes an imageButton a kind of submitButton but it doesn't work the way you
>> describe.  The url gets the image and it is
>> displayed as a kind of icon button.  That all works just fine and looks
>> good.  The problem happens when the button is
>> clicked, the dialog is displayed with the message and then closes (by
>> itself?) after a second or two.
>> 
>> I an trying to replace code that used the alert() function that worked but
>> didn't look that good and always placed the
>> alert box at the top of the screen.  That is the way alert() works and it
>> can't be changed.  So, I'm trying to use
>> something (anything) from jQuery or whatever that will put the box in the
>> middle of the screen.  If it also looks a
>> little better, that is a plus.
>> 
>> I also, have some Ajax going on that updates the time on the screen.  I
>> don't know if that has anything to do with this
>> problem and I don't know why it should but I thought I would mentions it.
>> 
>> Lou
>> 
>> 
>> On Sun, 23 May 2021 17:22:14 -0400, Louis LaBrunda <
>
>> Lou@
>
>> > wrote:
>> 
>>>Hi Everyone,
>>>
>>>I'm trying to use the jQuery dialog as a replacement for the JavaScript
>alert() function.  I'm using VA Smalltalk
>>>v9.2.2.  The code below opens the dialog when the image button is clicked
>but closes soon thereafter.  Does anyone have
>>>any idea why and what I can do about it?  Or have a better way of doing
>it?
>>>
>>>Lou
>>>
>>>help: aString on: html
>>>	"Create the html to display the help string."
>>>	| helpString id |
>>>
>>>	helpString := aString copyReplaceAll: LineDelimiter with: '\n\'.
>>>	html div
>>>		id: (id := html nextId);
>>>		script: (html jQuery new dialog
>>>			autoOpen: false;
>>>			html: [:r | r label class: 'Label'; with: helpString];
>>>			title: 'Help';
>>>			width: 1000;
>>>			resizable: true;
>>>			modal: true).
>>>	html space.
>>>	html imageButton class: 'HelpImage'; title: ('Popup Help - ', aString);
>url: theSession helpUrl;
>>>		onClick: (html jQuery id: id) dialog open.
>> -- 
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
>> 
>> _______________________________________________
>> seaside mailing list
>
>> seaside at .squeakfoundation
>
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-- 
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon



More information about the seaside mailing list