Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Hash Variables (nuSetHash)

Post Reply
nekpap
Posts: 27
Joined: Wed Dec 03, 2014 7:41 am

Hash Variables (nuSetHash)

Unread post by nekpap »

Hi,

I' am trying to pass values from a form to another form.

Into the first form (on nuLoadEdit),I set a hash variable with nuSetHash('student_id', '123').
Later I open the second form (with nuOpenForm). In this form when I'm trying to get the value with the nuGetHash('student_id'), I get "undefined".
Why that happens?
At the help page http://wiki.nubuilder.net/index.php/Jav ... C_value.29 says:

nuSetHash(name, value) :"Adds or sets a hash variable in the global hash variable array".

What exactly do you mean by global?

Thanks in advance
Nektarios
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Hash Variables (nuSetHash)

Unread post by admin »

nekpap,

nuSetHash() and nuGetHash() are used to access the js object, nuFORM...

(BTW, don't go changing any that are already set).
Capture3.PNG
Capture3.PNG (34.1 KiB) Viewed 3599 times
Opening a second window will not add the first window's nuFORM to the second window's nuFORM.

Setting nuSetHash('student_id', '123') in window 1 will not mean you can access it from window 2.

but it can be accessed using hash variables.. http://wiki.nubuilder.net/index.php/Hash_Variables

Steven
Post Reply