Increasing the length of a var in a javascript function

I need the length of the variable 'abbr' increased to 45 because it is being truncated when being display on the website textbox control.

<script language="javascript" type="text/javascript">

function doSubmit()
{
      cidabbr = document.frmAddCertification.CertificationId.options(frmAddCertification.CertificationId.selectedIndex).value;
      
      if (cidabbr.length > 0)
      {
          cidabbr = cidabbr.split('||')
          cId=cidabbr[0];
           abbr=cidabbr[1];
          //alert(cId);
          //alert(abbr);
          initVal = window.opener.frmTransferRequest.RequestCertifications.value;
          //alert(initVal);
          window.opener.frmTransferRequest.RequestCertifications.value = initVal + ' ' + abbr + ',';
          //alert(window.opener.frmTransferRequest.RequestCertifications.value);
          self.close();
      }
}
                              
</script>
keithwilson1developerAsked:
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.

nap0leonCommented:
Do you want to just change this line:
abbr=cidabbr[1];

Open in new window


to this?
abbr=45;

Open in new window

0
keithwilson1developerAuthor Commented:
I want 'abbr' to receive the value of 'cidabbr[1] but increase the size of 'abbr' from 30 to 45 to be able to display the full description that is being passed to it.
0
keithwilson1developerAuthor Commented:
the value passed to abbr is 'English Technology and Science' but when the value is moved to my display field it is 'english Technology and Scien'.
0
nap0leonCommented:
The value for "abbr" is whatever you want it to be.  It's length is determined by the value.

e.g.,
if abbr="1234567890", its length is 10.
if abbr="12345678901234567890", its length is 20.
if abbr="123456789012345678901234567890", its length is 30.
etc.

When you say the value is truncated, do you mean it is literally truncated,
e.g., abbr="12345678901234567890" but on your opener form only "123456789012345" makes it into the form?

or is it a display issue, where the form field is not wide enough for the user to see all of it?

In either case, what are the attributes of the RequestCertifications field?
It sounds like either "size" or "max-length" might be to blame.
http://www.tizag.com/htmlT/htmltextfields.php
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
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.