Convert to number?

Results 1 to 3 of 3

Thread: Convert to number?

  1. #1
    Join Date
    Dec 1969

    Default Convert to number?

    Can someone show me how to convert this line of code to numeric?<BR>Any help would be appreciated.<BR><BR>Thanks,<BR><BR>var Qty = eval("document.fmBoard.Qty"+strBank+".value");

  2. #2
    Arky Guest

    Default RE: Convert to number?

    var Qty = Number(eval("document.fmBoard.Qty"+strBank+".value "));<BR><BR>eval bad though baddddd.... <BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default Convert to number

    As arky said, eval isn&#039;t the most efficient way.<BR><BR>Number will work, but here is an alternative solution<BR><BR>var letter = "8";<BR><BR>var converttonumber = letter - 0;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts