|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Number to string issue
I have a page written in PHP that contains some checkboxes that calls a javascript function when checked.
Here is the checkbox field: PHP Code:
and here is the checkExpire javascript function: function checkExpire(expdate, boxno, partnum){} My problem is the value of $sspartnum might be '004' but when it gets passed to the function and I display the value, only '4' is getting passed without the leading zeros. Any help would be appreciated. Thanks |
|
#2
|
||||
|
||||
|
We need to see the code after the PHP has been parsed and the contents of that function.
__________________
Spreading knowledge, one newbie at a time. Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions IE7: the generation 7 browser new in a world of generation 8 browsers. Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around. |
|
#3
|
||||
|
||||
|
You're just missing a pair of quotes.
Code:
Quotes included
echo "<td width='5%' align='center'> <input name='$sesskey' type='checkbox' onclick='checkExpire(document.form1.exp$sesskey.value, $boxcount, \"$sspartnum\")'> </td>"; Last edited by Joseph Taylor : May 6th, 2008 at 04:44 PM. Reason: Damn, thanks Kravvitz :P |
|
#4
|
||||
|
||||
|
Joseph, shouldn't the ")" be outside the quotes?
![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > Number to string issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|