jQuery - I don't understand why I cannot add a select list in place of my existing code..

Hi All,
I don't understand why I cannot add a select list in place of my existing code.. please see below??
I know enough jQuery to get myself in trouble :)

$('#METHOD_REGION .uRegionHeading').html();
"
    <h1><img src="/i/f_spacer.gif" alt="" class="uAsterisk">&nbsp; Select type of ownership:<a class="eLink eLinkOn" title="Edit" href="javascript:apex.navigation.popup.url('f?p=4000:374:11718851501816::::P374_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:7177665918628066,212,2');"><img src="/i/e.gif" alt="Edit" class="eLink eLinkOn"></a></h1>
    <span class="uButtonContainer">
      
    </span>
  "

Open in new window

$('#METHOD_REGION .uRegionHeading').html('<select id="P_PROCESSOR" class="selectlist" ><option value="3">TSYS</option>
<option value="1">FDR</option>
<option value="4" selected="selected">NORTH</option>
</select>');

VM942:2 Uncaught SyntaxError: Unexpected token ILLEGAL
    at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
    at Object.InjectedScript.evaluate (<anonymous>:694:21)InjectedScript._evaluateOn @ VM938:895InjectedScript._evaluateAndWrap @ VM938:828InjectedScript.evaluate @ VM938:694

Open in new window

LVL 2
BILL CarlisleAPEX DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
This is not a jQuery problem, it's a javascript syntax error. The "Unexpected token" is the carriage return which cannot be part of a javascript string. You can get around it by putting everything on a single line, concatenating multiple lines or using a newline escape ( " \" ).
$('#METHOD_REGION .uRegionHeading').html('<select id="P_PROCESSOR" class="selectlist" ><option value="3">TSYS</option> \
<option value="1">FDR</option> \
<option value="4" selected="selected">NORTH</option> \
</select>');

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BILL CarlisleAPEX DeveloperAuthor Commented:
Awesome Tom! Wow.. those pesky newline characters.. that is a lesson that will help me for many future issues.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.