jQuery dialog question
Louis LaBrunda <[email protected]> Mon, 24 May 2021 08:05:28 -0400
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Organization | Keystone Software Corp. |
| Message-ID | <[email protected]> |
Hi Jupiter, Jupiter Jones <[email protected]> posted this: I may be wrong, but isnt 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" Im 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 <[email protected]> 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 [email protected] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside