Ovidiu,
Using hash cookies like #judet#, will only populate the Select as it loads. (returning from the server)
To rebuild a Select Object you need to go back to the server to get an updated list.
You can do this 2 ways.
1- The way you were doing it - saving the record.
2- Running a Hidden Procedure that will...
-Go back to the server.
-Ask a question.
-Return an answer with a new list for a Select Object - and some Javascript that will rebuild the Select Object.
http://wiki.nubuilder.net/nubuilderfort ... nPHPHidden
http://wiki.nubuilder.net/nubuilderfort ... ptCallback
If you would like an example, here is one we prepared earlier...
https://www.youtube.com/watch?v=ifbPhcvI5o8
This is the Procedure code...
Code: Select all
$a = [];
$s = "SELECT * FROM zzzzsys_translate WHERE trl_language = '#pick#'";
$t = nuRunQuery($s);
while($r = db_fetch_object($t)){
$a[] = $r->trl_translation;
}
$j = json_encode($a);
$js = "
get_phrases();
function get_phrases(){
var p = $j;
$('#phrases').empty();
if(p != ''){
for(var i = 0; i < p.length;i++){
$('#phrases').append('<option value=\"' + p[i] + '\">' + p[i] + '</option>');
}
}
}
";
nuJavascriptCallback($js);
Steven