I have legibly long text in a drop-down list on my asp.net page. it violates the UI boundary and goes beyond the allocated region of UI.
Is there anyway I can wrap [
An example from a Coldfusion site where I needed a list of titles to select from and lengths were up to 200 characters. The select options are looped from a query and divided at a full word point if the text string is too long, both strings get the same option value. A character pattern is appended to the second string, in this case "_ _". Use js to look for the pattern in the text of the selection. If pattern is found reset seletectedIndex by -1 so user only sees the first line of the text if they choose the second.
js:
function checkSelectedValue(str)
{
var val = str.options[str.selectedIndex].text;
var indx = str.selectedIndex;
var patt = /_ _/g;
var result = patt.test(val);
if(result){
str.selectedIndex = str.selectedIndex - 1;
}
}
cf: