Link to home
Start Free TrialLog in
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

asked on

Uncaught ReferenceError

Hi Experts,

I am trying to get the company name in document.ready function. Company name is available in the model.
 jQuery(document).ready(function () {
          var CompanyName =  @Model.Company;
}

Open in new window

When the @Model.Company is any number, for example "1111" then it works fine. But when it is coming as string like "TestCompany" I am getting the error  " Uncaught ReferenceError: TestCompany is not defined" .

Any suggestion what I am doing wrong?

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

ASKER

Thank you so much!!