New Balbooa Forms Released

Continue Reading
Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

Snowflakes

1 month 4 weeks ago #1

  • Robert's Avatar
  • Robert
  • Posts: 501
Hi guys,

love the snowflakes. Is there a way to have it run "automatically"?
I have no idea about coding, but something like this:

If date >= ("01.11" + year) and date <= ("29.02" + (year +1)) then
SNOWFLAKES

That way it would be automized and no need to activate / deactivate

Just a thought.

Regards from Germany

1 month 4 weeks ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 8744
Hello,
Thank you for contacting us

You can use this JS code:
let month = new Date().getMonth();
if (month >= 10 || month <= 1) {
    'Snowflakes code here';
}
Note: in javascript month is Integer value representing the month, beginning with 0 for January to 11 for December

Regards,
Vyacheslav, Balbooa.com

1 month 4 weeks ago #3

  • Robert's Avatar
  • Robert
  • Posts: 501
Hi Vyacheslav,

that is obviously never going to work because it can never be true! At least I think so... :woohoo:

But it gives me a place to start and maybe I can figure it out. The change to a new year has to be checked somehow, as I "want" the snow all of February also! :whistle:

1 month 4 weeks ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 8744
The code that we sent you works and will run the snow of November to February inclusive

Best Regards,
Vyacheslav, Balbooa Support Team

1 month 4 weeks ago #5

  • Robert's Avatar
  • Robert
  • Posts: 501
Hi Vyacheslav,

ups! :oops:

Sorry, I should have tried it first!! Thank you very much, I will try it later...

Have a super nice holiday season and a very successful 2020!

1 month 4 weeks ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 8744
Thank you for your kind words, we are very pleased!
Happy holidays!

Best Regards,
Vyacheslav, Balbooa Support Team

1 month 4 weeks ago #7

  • Robert's Avatar
  • Robert
  • Posts: 501
Working nicely, see www.main11er.de/

Now lets see, if it stops in March... :whistle: Don't want to play around with my date settings.

For some reason, it won't run as expected on my other site, still looking into that...

1 month 4 weeks ago #8

  • Robert's Avatar
  • Robert
  • Posts: 501
Can't figure out, why this www.hierkochtmann.de/ is behaving differently to two other sites...

As far as I can tell, I did the same thing on all three sites!

1 month 4 weeks ago #9

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 8744
You need to disable minimization, it looks like there is an error in the custom code and the code below the error does not work

Regards,
Vyacheslav, Balbooa.com

1 month 4 weeks ago #10

  • Robert's Avatar
  • Robert
  • Posts: 501
miniWHAT? No idea, what you mean or where to set it.

1 month 4 weeks ago #11

  • Robert's Avatar
  • Robert
  • Posts: 501
I found the problem! Comment with "// COMMENT" was the problem. Now with "/* COMMENT */" it is working.

Thank you again.

1 month 4 weeks ago #12

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 8744
You are welcome ;)
Powered by Kunena Forum