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('||')
          initVal = window.opener.frmTransferRequest.RequestCertifications.value;
          window.opener.frmTransferRequest.RequestCertifications.value = initVal + ' ' + abbr + ',';
Who is Participating?
The value for "abbr" is whatever you want it to be.  It's length is determined by the value.

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

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.
Do you want to just change this line:

Open in new window

to this?

Open in new window

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.
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'.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.