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.
Browse screen
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
I use my #browseTable# in a lookup on a subform (http://forums.nubuilder.cloud/viewtopic.p ... 931#p11931).
When I add your suggestion I always get message 'not available') and go back to the browsescreen of the form.
I think I have to add some JavaScript on my subform.
Johan
I use my #browseTable# in a lookup on a subform (http://forums.nubuilder.cloud/viewtopic.p ... 931#p11931).
When I add your suggestion I always get message 'not available') and go back to the browsescreen of the form.
I think I have to add some JavaScript on my subform.
Johan
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Browse screen
Johan, sorry but I made an error in my previous post: the code must be placed in Custom Code > Before Open (I correct it now).
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
I've tried before open but this doesn't work. (or I do something wrong)
I don't open the form Books (go to editscreen). I only use the browsescreen of the form BOOKS to choose books in my lookup.
In that browsescreen (BOOKS) i have a column available / not available.
What I wan't is an alert when user selects a book that is not available.
Johan
I've tried before open but this doesn't work. (or I do something wrong)
I don't open the form Books (go to editscreen). I only use the browsescreen of the form BOOKS to choose books in my lookup.
In that browsescreen (BOOKS) i have a column available / not available.
What I wan't is an alert when user selects a book that is not available.
Johan
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
I've created a function to check if the field in column actief = 2
I want to run it when lookup is changed. When I put checkfree(this) in the all tab - onchange of the lookup nothing happens. Any idea how I can activate it when lookup is changed.
Thanks
Johan
I've created a function to check if the field in column actief = 2
Code: Select all
function checkfree(pthis){
PRE = pthis.name.substring(0,13);
if (Number(document.getElementById(PRE+'res_actief').value )= '2'){
alert('Dit boek is niet beschikbaar in deze periode');
}}
Thanks
Johan
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
I've tried several options but all of them giving errors.
Tried to just paste the code above (nothing happens),
refer to it with nuSreen.checkfree(this) and edit the code to
With last code I get error
Any idea?
Johan
I've tried several options but all of them giving errors.
Tried to just paste the code above (nothing happens),
refer to it with nuSreen.checkfree(this) and edit the code to
Code: Select all
if (Number(nuGetRow('res_actief').value )= '2'){
alert('Dit boek is niet beschikbaar in deze periode');
}
Any idea?
Johan
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Browse screen
Johan, try this:
Code: Select all
var fieldID = nuGetRow() + res_actief;
if ( $('#'+fieldID).val() == '2') {
alert('Dit boek is niet beschikbaar in deze periode');
};
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
It works with this code:
Thanks a lot for your help.
Johan
It works with this code:
Code: Select all
var fieldID = nuGetRow() + 'res_actief';
if ( $('#'+fieldID).val() == '2') {
alert('Dit boek is niet beschikbaar in deze periode');
};
Johan
-
- Posts: 392
- Joined: Sun Feb 27, 2011 11:16 am
- Location: Belgium
Re: Browse screen
Max,
Still have 1 question
Now I get the alert but if i click on ok of the alert the book is still selected.
How can I prevent to select that book in my lookup?
johan
Still have 1 question
Now I get the alert but if i click on ok of the alert the book is still selected.
How can I prevent to select that book in my lookup?
johan
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact: