![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello all I'm trying to create a unique order number in a HTML form.(no DB backend) I found a function that looks promising, but I don't have the JavaScript know-how to get it working: function CreateOrderNr() {dt=newDate();//getstoday'sdaterightnow(tothemillisecond)year=dt.g etFullYear ();month=String(dt.getMonth()+1);if(month.length<2 ){ month="0"+month;}qMaxOrderNr="selectmax(ID_Order)f romtOrder";varmaxorder=DBv erbinding.execute(qMaxOrderNr);order=maxorder(0)+1 );OrderNr=year+ month+order;return(OrderNr);}// Taking out any DB element(s), this looks like it could be modified to produce a unique number. Then I can set it equal to a variable, and to a HTML Input Name on my form. Any revision suggestions would really get me out of a jamb. Thanks Solved it! Found the perfect solution. |
#3
| |||
| |||
|
|
Hello all I'm trying to create a unique order number in a HTML form.(no DB backend) |
![]() |
| Thread Tools | |
| Display Modes | |
| |