Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Confused with global hash cookies...

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
luca.ongaro
Posts: 64
Joined: Sun Jan 22, 2023 7:03 pm

Confused with global hash cookies...

Unread post by luca.ongaro »

Me again, a nightmare. :roll:
But nuBuilder is a great platform, worth my learning efforts, and I appreciate so much your assistance!
Now I have problems with global hash cookies.
In my nuuserHome I have an input object ('scelta_anno') and a button to launch a form.
The onclick() code of the button is just:

Code: Select all

nuSetProperty('my_anno', scelta_anno.value, true);
1) In the form that opens, at first #my_anno# appears to be not defined in the BB code, but then it is after a page reload - checked using nuDebug(nuHash());.
2) Instead, it appears to be correctly defined for the form custom code - checked using console.log(nuGetProperty('my_anno'));.
3) Finally, the hash_cookie disappears at all when I reload nuuserHome, disappointingly.

Where am I wrong?

Thank you
gerese
Posts: 132
Joined: Sun Dec 16, 2018 6:13 pm
Location: România
Has thanked: 30 times
Been thanked: 4 times

Re: Confused with global hash cookies...

Unread post by gerese »

Look at an example:

Code: Select all

var r1 = nuCurrentProperties().record_id;
nuSetProperty('my_anno', r1, true);
nuBuilderForte .... BIG Like !!!
luca.ongaro
Posts: 64
Joined: Sun Jan 22, 2023 7:03 pm

Re: Confused with global hash cookies...

Unread post by luca.ongaro »

Thank you, but, sorry, your hint didn't help me...
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Confused with global hash cookies...

Unread post by kev1n »

Does it help if you set the HK when the form is opened and the value of scelta_anno is changed (use the blur event)?
luca.ongaro
Posts: 64
Joined: Sun Jan 22, 2023 7:03 pm

Re: Confused with global hash cookies...

Unread post by luca.ongaro »

Thank you kev1n, you made my day.
But what is the explanation for this behaviour? Just to avoid future pitfalls...
Thanks a lot
Post Reply