DBookatay Posted April 25, 2009 Share Posted April 25, 2009 I am creating PDF's unings 9.1 Pro and am having a problem with my "0"s being trimmed when I do not want them to. Here is an example: var co_city = getField('co_city').value; var co_state = getField('co_state').value; var co_zip = getField('co_zip').value; if (co_city) { var co_add2 = co_city + ", " + co_state + " " + co_zip; } event.value = co_add2; This script takes the users address fields "city" "state" and "zip" and returns them as 1 line: Danbury, CT 06810. Except the "06810" turns into "6810". How do I stop the "0"s from being trimmed? The same result happens with dates. I use "dte1" + "dte2" + "dte3" = "date" Should read "04/25/09" yet is returned as "4/25/9" Any help would be greatly apprechiated. Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/ Share on other sites More sharing options...
Mchl Posted April 25, 2009 Share Posted April 25, 2009 Make a string not a number Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/#findComment-818917 Share on other sites More sharing options...
DBookatay Posted April 25, 2009 Author Share Posted April 25, 2009 Make a string not a number How is this done? I know very little about js Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/#findComment-819060 Share on other sites More sharing options...
Mchl Posted April 25, 2009 Share Posted April 25, 2009 Sometimes I hate myself: http://lmgtfy.com/?q=javascript+type+conversion Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/#findComment-819107 Share on other sites More sharing options...
DBookatay Posted April 25, 2009 Author Share Posted April 25, 2009 Sometimes I hate myself: http://lmgtfy.com/?q=javascript+type+conversion Baically thats the same as saying "read the manual..." Thanks for the loads of help, now instead of posting a quick question as an admitted user that knows little about javascript hoping for a quick answer, I'll go to Barnes & Noble and buy a book. Lots of help on this forum... Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/#findComment-819215 Share on other sites More sharing options...
Mchl Posted April 25, 2009 Share Posted April 25, 2009 Perhaps that's something you should do. This might be a quick question for you, but necessarily a quick answer. And besides, I'm not much into JavaScript either... so I would have to do same googling as you Link to comment https://forums.phpfreaks.com/topic/155588-acrobat-pdf-help/#findComment-819217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.