Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #21190 > unrolled thread

Smoke-js library ??

Started by"Mel Smith" <med_cutout_syntel@aol.com>
First post2013-09-07 15:47 -0600
Last post2013-09-09 17:56 -0600
Articles 4 — 2 participants

Back to article view | Back to comp.lang.javascript


Contents

  Smoke-js library ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-09-07 15:47 -0600
    Re: Smoke-js library ?? Christoph Michael Becker <cmbecker69@arcor.de> - 2013-09-08 20:03 +0200
      Re: Smoke-js library ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-09-09 08:42 -0600
        Re: Smoke-js library ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2013-09-09 17:56 -0600

#21190 — Smoke-js library ??

From"Mel Smith" <med_cutout_syntel@aol.com>
Date2013-09-07 15:47 -0600
SubjectSmoke-js library ??
Message-ID<b91l7oF5bgdU1@mid.individual.net>
Hi:

    Becasue the alert() function display is so different among the various 
browsers, I decided to try the smoke.js library.

    This library has replacements for Alert(), Confirm(), etc

    I've had fairly good results this morning using the replacement alert() 
with:

        smoke.alert("message here") ;

    However, I've had failures with:

        smoke.confirm("Did this work O.K. ?")

    ... whereby the smoke.confirm() function failed to halt execution, and 
the statements following that smoke.confirm() function 'ranover' it !.

Has anyone here had recent occassion  to test the smoke library ?  and, if 
so, what results did you have please ?

Thanks,

-- 
Mel Smith

[toc] | [next] | [standalone]


#21205

FromChristoph Michael Becker <cmbecker69@arcor.de>
Date2013-09-08 20:03 +0200
Message-ID<522cbb98$0$9514$9b4e6d93@newsspool1.arcor-online.net>
In reply to#21190
Mel Smith wrote:

>     ... whereby the smoke.confirm() function failed to halt execution, and 
> the statements following that smoke.confirm() function 'ranover' it !.

I'm quite sure that this is the normal behavior of the function.  You'll
have to rewrite existing code that uses window.confirm() somewhat, for
instance:

  result = confirm("The record will be deleted!");
  if (result) {
    // delete the record
  } else {
    // do something else
  }

has to be changed to:

  smoke.confirm("The record will be deleted!", function(result) {
    if (result) {
      // delete the record
    } else {
      // do something else
    }
  });

Cf. <http://smoke-js.com/docs/>

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#21230

From"Mel Smith" <med_cutout_syntel@aol.com>
Date2013-09-09 08:42 -0600
Message-ID<b96530F316qU1@mid.individual.net>
In reply to#21205
Cristoph said:

> I'm quite sure that this is the normal behavior of the function.  You'll
> have to rewrite existing code that uses window.confirm() somewhat, for
> instance:
>
>  result = confirm("The record will be deleted!");
>  if (result) {
>    // delete the record
>  } else {
>    // do something else
>  }
>
> has to be changed to:
>
>  smoke.confirm("The record will be deleted!", function(result) {
>    if (result) {
>      // delete the record
>    } else {
>      // do something else
>    }
>  });
>
> Cf. <http://smoke-js.com/docs/>
>


Hi Christoph:

    I had a response to a query from Jonathan Youngblood (creator of this 
library) last nite. He also said what you've told me.

So, I'll work on it today.

Thank you for the response.

-Mel

[toc] | [prev] | [next] | [standalone]


#21244

From"Mel Smith" <med_cutout_syntel@aol.com>
Date2013-09-09 17:56 -0600
Message-ID<b975hdF9pg4U1@mid.individual.net>
In reply to#21230
Hi:

    Because of my difficulty in understanding the smoke replacement for 
alert, and because of the 'flow' problem (altho Christoph Becker and 
Jonathan Youngblood showed how easily it was to workaround this limitation), 
I still decided this morning to start creating my own Alert system:

    I have placed my first stab at it on one of my web sites: 
www.whosaway.com

    If / when you visit the site, please enter the password:  'alert' to 
gain access to the page.  (This site is also used by my other Harbour 
language associates as a download repository accessed with a different 
password.  You may wish to visit the ng: comp.lang.xharbour)

    The source code is of course primitive (like me).  I want to place all 
'styling' of the alert package *inside* a js functions

    But feel free to correct and / or modify it until you consider it 
worthy.

    Later on I'll be striping out and minifying the js code before using it 
on my many other pages.

    Hope you can post on our ng a 'better' version than I have provided.

Thanks,

-Mel Smith
 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web