troubleshooting Question

Losing leading zero on variable string made up of all numbers

Avatar of Bonnie_K
Bonnie_K asked on
JavaScript
3 Comments1 Solution545 ViewsLast Modified:
Hi,

I am trying to pass a variable to another page by putting it into a textbox and posting the info to the next page.

The variable vbchoice is a string which happens to be made up of all numbers in this case.  A sample is 0359001.  The webpage is getting 359001 instead if all six characters.  How to I declare this variable as a string so that I don't lose the leading zero?

Thanks a lot,
Bonnie

Hree's the code to submit the page:
<script language="javascript">
function ChooseView(vbchoice)
{
     document.form1.txtProject.value=vbchoice
     document.form1.action ="project_tasks.cfm?choice=3";
     document.form1.target ="main";
     document.form1.submit();
}
</script>

Here's the link to sumbit the page:
<A href="##" onclick="ChooseView(#prProject#);return false;" class=link2>#Mid(prProject,2,4)#.#Right(prProject,2)# #Left(Project_Name,13)#</a>
ASKER CERTIFIED SOLUTION
dakyd

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros