In reference to an earlier post, I am having some trouble formating my JavaScript correctly.
The previous post can be viewd here:
I must be missing something. Here is the code I wrote in the onBlur event of my field:
document.forms[0].Pro1.value = String(document.forms[0].Pro1.value).substring(4,3);
The value I then enter in the field is pgh-010_1234567. When I leave the field and execute the script, the value is converted to just -. It’s removing everything but the -.
So, I altered the code to look like so:
document.forms[0].Pro1.value = String(document.forms[0].Pro1.value).substring(4);
when entering the same as above pgh-010_1234567, I am returned with 010_1234567.
Am I doing someing wrong or just misunderstanding the meaning of the script?
Regards,
-JS