Skip to main content

I wonder if is possible to pass Dynamic values to a DropDown DataLabel from JS.

 

Depending on the load conditions the Dropdown will changed.... re-using the same dropdown control.

 

Example

 

CASE I :: EN

<select name="weekday">
<option value=""> - Select - </option>
<option value="Mon">Monday</option>
<option value="Tue">Tuesday</option>
<option value="Wed">Wednesday</option>
...
<option value="Sun ">Sunday</option>
</select>


CASE I :: SP

<select name="dia">
<option value=""> - Seleccionar - </option>
<option value="Lun">Lunes</option>
<option value="Mar">Martes</option>
<option value="Mie">Miercoles</option>
...
<option value="Dom">Domingo</option>
</select>

 

 

This way depending on the selected language, the form will render the appropiate value.

 

:: Yes potentially if we can have a JS-> Data Feed from any URL in JS/XML could be re-used to Forms to render any kind of data.

 

THX Dino.

Dear ,

 

Approaches u might wanna try and hope it fits ur solution ,

 

1- Set language control , this is a custom control on the community market that u could use ,

it includes creating resource files , and pointing to them , based on browser culture it changes the data language.

 

2-create 2 drop down lists and depending on the browser culture , show/hide the drop downs to fit the language currently used on the browser .

 

2-create a table in SQL , then create stored procedure to retrieve a list of data depending on a flag input parameter ,

for example

table with fields

ID ---- FieldInEnglish ---- FieldInFrench

then u create a stored procedure to return list of data , input parameter is ur flag that indicates which language to retrieve ,

1=english  ,2=french , or w/e u could use as flag ,

if 1 , retrieve list of data in english , if 2 retrieve list of data in french .

and then u generate Smart object off of that SQL stored procedure and use it as data source for ur drop down list .

 

Hope it helps!

Regards.


Thank you Ahmad. yes I surely can create SMO's from SQL and hide Multiple Dropwdowns for different languages.

 

I was just wondering int have some kind of JS directly from the read only list from Sharepoint 2013.

http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx

 

The idea was just to populate the control without actually have to integrate with Sharepoint. just thinking the less intrusive specially when is just a small list.

 

THX DIno.


Reply