I have a conceptual question about hash variables after reading all the wiki documentation on hash variables and functions:
I understand that when hash variables are used in fields, php scripts, etc - they are replaced by the corresponding hash values before anything is run or interpreted. I'm assuming that all happens server-side when a form or other event is submitted by the client to the server. However, the nuSetHash() function is javascript, which is client-side functionality, right? So does that only set the value of the hash variable for the client? How does that get handed back to the server so it can be used in whatever form or output that comes next?
Thanks!
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Hash variables - server-side and client-side
-
- Posts: 16
- Joined: Mon Feb 09, 2015 6:17 pm
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Hash variables - server-side and client-side
jegalink,
If you ran this in JavaScript (on the client side).
if you then had a hash variable in the php code On Save eg.
creating..
Steven
If you ran this in JavaScript (on the client side).
Code: Select all
nuSetHash('new_color','red');
Code: Select all
if ('#new_color#' == 'red'){
doSomething();
}
Code: Select all
if ('red' == 'red'){
doSomething();
}