Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-10-24 Thread Marc Smith
Thank you, that did the trick. --Marc On Fri, Oct 21, 2016 at 5:00 PM, Scott Hunter wrote: > You need single-quotes around > flash.fadeOut("slow") > > Otherwise, as you have seen, it gets executed immediately instead of after a > delay. > > > On Tuesday, October 18, 2016 at 9:35:30 AM UTC-4, Mar

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-10-21 Thread Scott Hunter
You need single-quotes around flash.fadeOut("slow") Otherwise, as you have seen, it gets executed immediately instead of after a delay. On Tuesday, October 18, 2016 at 9:35:30 AM UTC-4, Marc Smith wrote: > > Hi, > > I'm relatively new to JS but the strange quote character at the > beginning (

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-10-18 Thread Marc Smith
Hi, I'm relatively new to JS but the strange quote character at the beginning (I thought it was a back-tick, but doesn't appear it is) and single quote at the end in that line don't look right to me -- is that correct? I tried the code with Jim's change of using ".w2p_flash" but it still doesn't w

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-13 Thread Jim Brouzoulis
Thank you very much for your help! (...and sorry for the late reply) It didn't work at first but then I noticed a typo: the class should be '.w2p_flash'. Regards // Jim Den måndag 11 juli 2016 kl. 10:49:08 UTC+2 skrev Massimiliano: > > Hi Jim, > I’m doing it in this way: > > Edit static/web2p

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread Anthony
The built-in flash mechanism involves the following: 1. Setting response.flash in the server-side code. 2. Insertion of {{=response.flash}} somewhere in the view. 3. Embedding {{=response.flash}} in a div with class "flash". 4. CSS rules defining how the "flash" class is displayed (def

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread rajjmatthur
On that note, how do we customize the flash? For example, lets say we want a much larger and brighter flash with css rule (brighter color), or have to display as soon as user log in on the center of the screen as an advertisement? On Monday, July 11, 2016 at 4:49:08 AM UTC-4, Massimiliano wrote

Re: [web2py] Hide flash message after some elapsed time instead of on click

2016-07-11 Thread Massimiliano
Hi Jim, I’m doing it in this way: Edit static/web2py.js search for /*helper for flash messages*/ and add this command: setTimeout(‘jQuery(".flash").fadeOut("slow")',5000); just after: if (flash.html()) flash.append(' × ').slideDown(); Adjust 5000 that stands for 5 secods to your needs. On T

[web2py] Hide flash message after some elapsed time instead of on click

2016-07-10 Thread Jim Brouzoulis
Hi everyone, Can I easily customise the web2py.js file to automatically hide/fade out the flash message after some given time (like a few seconds) instead of clicking on it? If so, how? I have a feeling that the solution is probably not that complicated but my js-skills aren't very impressive