Trying to change to uppercase values in input fields populated by json

Hi,
I have some code shown below that populates a few text fields but the data is mixed case and I need to change it to uppercase. Any idea how I could do it given below?

$( "#getvin" ).click(function() {
$.post("trades/vin_decode/",{ vin: $('input[name="vin"]').val() },
	function(data){
$('input[name="year"]').val(data.styleHolder[0].year);
$('input[name="make"]').val(data.styleHolder[0].makeName);
$('input[name="model"]').val(data.styleHolder[0].modelName +" "+ data.styleHolder[0].categories["Vehicle Style"]);
$('input[name="trim"]').val(data.styleHolder[0].trim.name);
$('input[name="engine"]').val(data.styleHolder[0].engineSize + " Litre - " + data.styleHolder[0].engineCylinder +" Cylinder Engine");
$('input[name="transmission"]').val(data.styleHolder[0].transmissionType);
$('input[name="driveType"]').val(data.styleHolder[0].attributeGroups.DRIVE_TYPE.attributes.DRIVEN_WHEELS.value);
$('input[name="fuelType"]').val(data.styleHolder[0].engineFuelType);
	},
    'json');
  });

Open in new window

LVL 1
tjyoungAsked:
Who is Participating?
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.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Just add .toUpperCase();

$('input[name="year"]').val(data.styleHolder[0].year).toUpperCase();
0
tjyoungAuthor Commented:
I tried and got this for example:

TypeError: $("input[name=\"make\"]").val(data.styleHolder[0].makeName).toUpperCase is not a function
[Break On This Error]       

$('input[name="make"]').val(data.styleHolder[0].makeName).toUpperCase();
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Ok, try this

('input[name="year"]').val(data.styleHolder[0].year.toUpperCase());
0

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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Here is a sample I threw together.

http://jsbin.com/OjEpicu/1/edit?html,js,output

x='lower case';

$('div').html(x.toUpperCase());
$('input').val(x.toUpperCase());

Open in new window

  <div></div>
  <input type="text">

Open in new window

0
tjyoungAuthor Commented:
Awesome. That nailed it. Thanks for taking the time!
0
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
JavaScript

From novice to tech pro — start learning today.