0

I have here my jquery (coffeescript)

    if value.kind != 'Quasi-Judicial'
      if value.court_agency !in court_agency_with_branch
        if value.court_agency != 'Department of Justice'
          @court_agency  = "<option value=\"" + value.id + "\"> Branch "+ value.branch_division + ", " + value.court_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"              
        else
          @court_agency  = "<option value=\"" + value.id + "\">" + value.court_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"
      else
          @court_agency  = "<option value=\"" + value.id + "\"> Division "+ value.branch_division + ", " + value.court_agency + "</option>"              
    else
      @court_agency  = "<option value=\"" + value.id + "\">" + value.department + ", " + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"      

on this part

"<option value=\"" + value.id + "\">" + value.department + ", " + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>"              

I want to put some code \n

"<option value=\"" + value.id + "\">" + value.department + ", " + "\n" + value.govt_agency + ", " + @city_or_municipality + ", " + value.province + "</option>" 

but nothing happens.

The value looks like:

Department of Blah blah, City of This thing, Province of this stuff

What possible code I can use to create an output like this:

Department of Blah blah,
City of This thing,
Province of this stuff
BartSabayton
  • 535
  • 1
  • 5
  • 15

2 Answers2

0

Take a look at Can you have multiple lines in an <option> element?. (What you're looking for is a br tag in an option tag)

Community
  • 1
  • 1
DebbieMiller
  • 432
  • 1
  • 3
  • 12
  • because it's not permitted : http://www.w3.org/TR/2011/WD-html-markup-20110113/option.html. Maybe you should try with some jquery. – DebbieMiller Oct 20 '14 at 11:18
0

Please refer this demo http://shyalika.com/mutiline_select_example

you can find more information here: http://shyalika.com/multiline_select_control

Ganesh Todkar
  • 507
  • 5
  • 12