Page 1 of 1
Chained selects
Posted: Wed Sep 22, 2010 2:09 pm
by aliminnet
Problem 1)I have a dropdown menu and i want it related to another lookup. I mean 'city' is a dropdown and 'country' is a lookup select.
İ want it when i change 'country' at the dropdown menu cities will be shown which are belong the country what we change.
how can i do that?
Probelem 2)How can i include Jquery to the nubuilder?
İ hope i could explain my problems
Re: Chained selects
Posted: Thu Sep 23, 2010 5:40 am
by steven
aliminnet,
By doing it the way you are suggesting, you need to fill in 2 fields as well as needing a lot of ajax and or javascript.
I you created a lookup that contained both country and city (with the city as the primary key) you could easily search for either or both, and have the country field automatically populated when you chose the city, using the subform on the lookup tab of lookup object..
lusf.png
(this would populate a field called
cus_city on the form, with the field
cit_name from the query of the lookup)
And this would require no ajax or javascript.
to add jquery you'd need to add a line
print "<script type='text/javascript' src='jquery.js' ></script>$this->CRLF";
above or under
print "<script type='text/javascript' src='common.js' ></script>$this->CRLF";
in form.php
Steven
Re: Chained selects
Posted: Thu Sep 23, 2010 11:06 am
by aliminnet
Answer of first question is not what i want exactly but thank you for answer it is useful. I solved problem with it.
But 2. answer doesn't work when i write them into form.php any form doesn't work at my application.
Only index page is working. Rest of it not working.
Thank you for answer
Re: Chained selects
Posted: Thu Sep 23, 2010 11:11 am
by aliminnet
Answer of first question is not what i want exactly but thank you for answer it is useful. I solved problem with it.
But 2. answer doesn't work when i write them into form.php any form doesn't work at my application.
Only index page is working. Rest of it not working.
Thank you for answer
steven wrote:aliminnet,
By doing it the way you are suggesting, you need to fill in 2 fields as well as needing a lot of ajax and or javascript.
I you created a lookup that contained both country and city (with the city as the primary key) you could easily search for either or both, and have the country field automatically populated when you chose the city, using the subform on the lookup tab of lookup object..
lusf.png
(this would populate a field called
cus_city on the form, with the field
cit_name from the query of the lookup)
And this would require no ajax or javascript.
to add jquery you'd need to add a line
print "<script type='text/javascript' src='jquery.js' ></script>$this->CRLF";
above or under
print "<script type='text/javascript' src='common.js' ></script>$this->CRLF";
in form.php
Steven