Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

Designing a app in which i am trying to select countries in a select menu component, as it is difficult to enter all the countries in a list one by one is there any other alternative through which i can use a select component and have all the values of the countries?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Select menu

Hi Ananya,

No. You can store list of countries in Database and map them to a Select component, but this will slow down the application. So it's up to you to decide.

Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

OK oK now i am facing another problem.....
using the value selected in the select menu of d countries i need to display a image in the corresponding image tag..... i have uploaded images onto appery .... \
For example wen i select USA i need the Image asset to change into the USaflag.jpg can u pls help me with a Js.... all the images are uploaded onto appery and the select menu has all the values of countries so,
when i select a component on the select i want its respective image to be displayed

Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

PLs Any1 pls do Help me With this

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Select menu

Hi Ananya,

If you store file name in a Select component then you can add the following JavaScript on Select component valueChange event:
codevar newPath = $($(Appery("mobileselectmenu_6")).find("option:selected")).attr("value");
Appery('mobileimage_9').attr("src", "files/views/assets/image/" + newPath);
Appery('mobileimage_9').refresh();/code
where mobileselectmenu_6is a select component name
mobileimage_9 is an image component name

Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

Thanks for your help and support...
I m making a app with quiet a few lists and at the end there is a submit button...
i want to assign a property to all the lists and inpbox components in such a way that the submit button will be dimmed unless n until all the feilds r entered by the user.... and then i want the submit button to be enabled........hope u r getting wat i wanted to say.... this is to signify the user that he has accidently forgotten to select a option hence cannot continue... is this possible?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Select menu

You can add verification for all necessary components and save value of that verification to "flag" variable. If it's equal to true - make the button active, if false - not active.
preif (flag === true){
Appery("mobilebutton_211").removeClass("ui-disabled");
} else {
Appery("mobilebutton_211").addClass("ui-disabled");
}/pre

Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

HI Maryna Brodina,
I didnt understand!
suppose i named my components as below
L1, }
L2, } LISTS
L3 }
and
inputbox1, }
inputbox2 } INPUT BOX
inputbox3 }

SUBMIT } button

How can i set the verification for all necessary components and save value of that verification to "flag" variable?
and how can i set the property to the SUBMIT button?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Select menu

Hi Ananya,

codeflag = Appery("mobiletextinput_1").attr("value") === "" & Appery("mobiletextinput_2").attr("value") === "" & Appery("mobiletextinput_3").attr("value") === "&quot/code
This is for Inputs. What do you want to check in List?

Ananya Raju
Posts: 0
Joined: Tue Oct 01, 2013 8:04 am

Select menu

Thanks for the inputBox in Lists i have to check whether a user has made selection...for Eg. in a list containing countries i want the user to select a particular country and then only proceed .....
One more thing
"if (flag === true){
Appery("mobilebutton_211").removeClass("ui-disabled");
} else {
Appery("mobilebutton_211").addClass("ui-disabled");
}"

where should i write this code ? on the click event of the submit button?

and the above codes for input should that be written on which event of the input box?
input event or value change?

Return to “Issues”