Hi TeaYou,
If you're planning to populate a optionset using JScript (without the values actually being in the optionset), you can do that by adding options like you do for normal select elements in HTML. If you're using CRM 2013, you can use the adoption XRM method
to add options to optionset. But then again, in order for you to preserve the selected data, you need to store it in a hidden textbox field in the CRM form. If you do not store it anywhere, there is no way the selected data will be stored anywhere in
CRM, since the selected value actually doesn't exist in the optionset values. Also, if you plan on reading the values from a separate .xml file as Web Resource in CRM, I do not think there is a way to read XML files using JScript.
Does that answer your question?
Admin QuikView Solution for CRM 2013