on 04-28-2014 5:21 AM
have some issue on it .
run the app first time select the choice field it will show at empty after click on outer space and then click the choice field again it shows the data
but my need is first time to select the choice field it shows the data pls help its urgent
i need some documents on SMP 2.3 for development purpose
Any idea to clear on this issue. because till now i didn't get any solution on that choice field problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand correctly, you want to populate a choice field with options. If so, don't you want to move the retrieval of the <select> element outside of your for loop? E.g.:
CommonNamespace.Fillregion_dd = function() {
if(Region.length > 0){
var region_dd = document.getElementById("Reg");
for ( var i = 0; i < Region.length; i++) {
var region_opt = document.createElement("option");
if (Region[i].parent == "AllRegion") {
region_opt.text = Region[i].desc;//
region_opt.value = Region[i].id;
// Region[i].id;
region_dd.options.add(region_opt);
}
}//For
}
};
Thanks,
Andrew.
in custom.js this is my coding:
CommonNamespace.select=function ()
{
OData.read({requestUri: requestUri_getSelection, user: "fff", password: "ff"},
function(data) {
if(data.results.length > 0){
for ( var i = 0; i < data.results.length; i++) {
// Region & Sub Region
if(data.results[i].ID != ""){
var Region_obj = {parent : data.results[i].Parenth1, id : data.results[i].ID, desc : data.results[i].Evdescription };
Region.push(Region_obj);
CommonNamespace.Fillregion_dd();
}
//Function to Fill Region dropdown
CommonNamespace.Fillregion_dd = function() {
if(Region.length > 0){
for ( var i = 0; i < Region.length; i++) {
var region_dd = document.getElementById("Region");
var region_opt = document.createElement("option");
if (Region[i].parent == "AllRegion") {
region_opt.text = Region[i].desc;//
region_opt.value = Region[i].id;
// Region[i].id;
region_dd.options.add(region_opt);
}
//
}//For
}
};
and my html codi on hypridapp_jqm.html:
<div data-role="fieldcontain" style="border-bottom-width: 0px;"
class="containing-element">
<label class="left" for="Region">Region*</label> <select
class="right" id="Region" sup_num_of_decimals="0"
sup_html_type="text" sup_static_options="true">
<option value="Select">--Select--</option>
</select><span id="Budget_Analyzer1_Region_help" class="help"></span>
</div>
HTMl code: <div data-role="fieldcontain" style="border-bottom-width: 0px;" class="containing-element">
<label class="left" for="Reg">Reg*</label>
<select class="right" id="Reg" sup_num_of_decimals="0" sup_html_type="text" sup_static_options="true" >
<option value="Select">--Select--</option> </select><span id="bb" class="help"></span>
</div>
js code:
CommonNamespace.Fillregion_dd = function() {
if(Region.length > 0){
for ( var i = 0; i < Region.length; i++) {
var region_dd = document.getElementById("Reg");
var region_opt = document.createElement("option");
if (Region[i].parent == "AllRegion") {
region_opt.text = Region[i].desc;//
region_opt.value = Region[i].id;
// Region[i].id;
region_dd.options.add(region_opt);
}
//
}//For
}
};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
have written some js code and html coding for fill the value on choice field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mani,
Can you please share the settings details what you have done for choice control? Have you written any piece of code for this functionality? If yes, please share.
For SMP 2.3 hybrid app development, you can refer
Tutorial: Hybrid App Package Development 2.3
Rgrds,
Jitendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.