top of page

Switch-Save-Function

Index

(permissions)

OFF

ON

(permissions)

BTNswitch1

BTNsave

Member-undefined

BTNnext

BTNprevious

[How2]
CODE
Database
Under_Construction.png
CLOSE.png

CODE

DATABASE

CLOSE.png
111.png

Brainstorming (used elements)

How to realize this project?

​

Ok, well at first we have to do some brainstorming, to know which elements will be needed and how will look the function for this little project.

​

Which elements we will need for this?

- Data-Collection (Database) (it will be needed for safing the "switch-status" of any switch-button, we will create later in our project). Of course there is also still another way to do it without dataset, but in this case we will use a dataset.

 

- Dataset will be used as a connecting element between our database (data-collection) and  our function (code).

​

- Of course we will need minimum 1x-switch-button. Here we can decide, how we want to design and realize our project. There are a few possible types of how to design it. We will see 2-different designs, how to solve this problem. (In this case just 1-switchbutton will be used  for several "Member-State"-queries. In the second example which will follow later, we will se another solution-structure.

​

- Two more buttons are implemented in this first solution-example and connected to the dataset to allow switching the members from MEMBER-1 to MEMBER-5.

​

Abridged version:

What to do? ----> creating a save-function, which will save all states of several user in a database in "boolean"-values.

​

GO-TO ---> STEP-I.

CLOSE.png

Step-I (designing the project-flow)

009
008.png
007.png
005.png
CLOSE.png

Now we know what elements we need, so lets start to create and design the structure/flow of our project.

​

First of all, we create a database and configure it to our needs. We give it for examle the name "Switch-Safe-Function" and create a 

new column, called "BTN-Status" (the generated ID = "btnStatus") and set the value-format to ---> "Boolean" (true/false).

​

Further we will need a switchbutton 

 

​

​

with whose help we can switch between 2-value, to set our chosen 

value (OFF or ON) ---> (FALSE or TRUE).

​

Furthermore, we will need a SAVE-button, which will save the state

of the chosen Member (Member1-Member5).

​

​

And finally we have to put in 2 normal buttons to create a switch-

function.

​

​

​

​

So that's it. These are all elements we need to realise this project.

  (+ few additional text-elements.)

​

​

Our project-sketch is ready, now let's go over to the next step and give our little example a little bit of life, by coding some JavaScript-Code.

 

GO-TO ---> STEP-II.

111.png

Step-II (coding-part)

CLOSE.png

After we have created our little page-sketch, now we are easily able to programm all the needed interactions, because we 

know exactly all the project-details.

​

As every code of page starts with "onReady", we put in our "onReady"-function

 

which is direcly followed by the "dataset-onReady"-function

$w.onReady(function () { 

     $w("#"+DATASET).onReady( () => {

​

     })

})

Under_Construction.png

Switch-Save-Function-II

(permissions)

OFF

ON

(permissions)

BTNswitch1

SAVE

BTNsave

Member

BTNnext

BTNprevious

[How2]
CODE
Database
Under_Construction.png

Comment-Box

CLOSE.png

Version-1.0

Under_Construction.png

Leave a comment. . .

Arrow.png

General-Settings

ON                 OFF

Show Text-Length

ON                 OFF

max. Text-Length

ON                 OFF

Show Key-Press

ON                 OFF

Show Key-Code

ON                 OFF

Show Total-Count

Character-limit

Load default settings
Save
lestherg-esilverconnect 2:52:59 AM
8/20/2022
s18376 1:07:58 AM

asdas

1/20/2022
s18376 1:03:31 AM

asdas

1/20/2022
arthurvalatin 00:15:21

he he heeeeeeeeeee!

30/12/2020
arthurvalatin 00:15:03

undefinedha ha haaaaaaaaaaa!undefined

30/12/2020
arthurvalatin 00:14:48

My little joke!

30/12/2020
arthurvalatin 00:14:14

really real

30/12/2020
o0oelys 17:55:55

real

23/09/2020
russian-dima 18:49:20

123231

2.9.2020
russian-dima 18:49:17

213213

2.9.2020
russian-dima 17:56:10

123123123

2.9.2020
russian-dima 18:48:04
31.8.2020
russian-dima 18:46:47
31.8.2020
russian-dima 18:46:10

Here you can see my link to googhttp://www.google.de target=_self>www.google.dele.......

31.8.2020
russian-dima 18:45:34

Here you can see a LINK ---> myLinktoGoogle

31.8.2020
russian-dima 14:19:38

rrrrrrrrrr

31.8.2020
russian-dima 14:18:28

qeeeqweqweqwe

31.8.2020
russian-dima 14:01:12

awddawdawd

31.8.2020
russian-dima 13:58:53

23123213

31.8.2020
juanfelipeamt 7:46:31 PM

I tried to change my picture. :)

8/25/2020
juanfelipeamt 7:43:57 PM

Hellooooo

8/25/2020
mr-money-man 13:41:23

As you can see, i changed my PIC (of the test-user --> mr-money-man)

25.8.2020
mr-money-man 13:40:45

Hello!

25.8.2020
russian-dima 18:59:25

You are still not a member of my site? So it is time to change it xDDDDDD

24.8.2020
russian-dima 18:58:02

If you want to write a comment, than you have first to log-in!

24.8.2020
russian-dima 17:58:34

New logo? ^^

22.8.2020
russian-dima 17:58:16

You again xD

22.8.2020
arthurvalatin 16:19:33

Hi

21/08/2020
mr-money-man 00:30:40

As you can see in this version, i tried to implement more functions. You will fi
nd the first ones, when you go into sthe OPTIONS-MENU.

8.8.2020
mr-money-man 00:29:32

It is much more comfortable. ^^

8.8.2020
Page 1 of 2
Design
Settings
About
CLOSE.png
Leave a comment, or start a chat.

Post-Comment

- - -

Pressed-Key

- - -

Key-Code

Text-Length

- - -

max. Text-Length

- - -

Number of Comments

- - -

designed & developed by russian-dima

Write a comment
bottom of page