Hello,
I need a toggle-button on the browsescreen which alllows me to filter the records on the browse screen
I managed to make a jsscript for the button:
function nuLoadBrowse() {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
if(dd<10) {
dd='0'+dd;
}
if(mm<10) {
mm='0'+mm;
}
today = "'" + yyyy+'-'+mm+'-'+dd + "'";
jsdatum=today;
/* Append a new Action Button on Browse form */
var space = $( "#nuSpace" ).clone().removeAttr("id");
$( "#nuActionButtonHolder" ).append(space);
var elem = '<input id="execButton" type="button">';
$( "#nuActionButtonHolder" ).append(elem);
$( "#execButton" )
.addClass( "nuButton" )
.attr( "value", "Alles" )
.click(function() {
if (this.value == "Toekomst")
{
this.value = "Alles";
jsdatum=today;
}
else
{
this.value= "Toekomst";
jsdatum='2001-01-01';
}
}
);
}
The button works, but now I need to transger the value from the variable "jsdatum" to either the sql of the form or to the filter
I haven't got a clue how to transfer this, I think I will need a Hash-variabel, but I cant solve it.
And I do not jnow the proper syntax for this value. I tried to look it up with nudebug, but no success.
Furthermore I wonder if each change will cause an automatic requery.
Anyone know how to do this?
As you might notice I am a newbie, but I already love Nubuilder.
Thanks!
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
toggle button on browse screen
Re: toggle button on browse screen
thanks for your answer, but I haven't got a clue what you mean. yes, i tried and tried.
To narrow my question, if I use a hash-variable in the main sql of a form, how do I assign a value to that hash-variable in PHP
Sorry for the question .....
To narrow my question, if I use a hash-variable in the main sql of a form, how do I assign a value to that hash-variable in PHP
Sorry for the question .....
Re: toggle button on browse screen
Henk_2a,
If you put this..
in your JavaScript it will copy the variable jsdatum to the field named nuSearchField (The green search field)
Steven
If you put this..
Code: Select all
$('#nuSearchField').val(jsdatum);
Steven
Re: toggle button on browse screen
it took me some time to understand this, your answers often raise a lot of questions.
My knowledge of JavaScript is slowly increasing and so I understand your javascript-answers more and more.
At the end this answer solved my problem, thanks !
My knowledge of JavaScript is slowly increasing and so I understand your javascript-answers more and more.
At the end this answer solved my problem, thanks !