Click here to Skip to main content
15,897,360 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionHow can i remove pipe character in string using regex Pin
grewin8-Nov-10 16:31
grewin8-Nov-10 16:31 
AnswerRe: How can i remove pipe character in string using regex Pin
grewin8-Nov-10 17:00
grewin8-Nov-10 17:00 
GeneralRe: How can i remove pipe character in string using regex Pin
sohighthesky15-Nov-10 19:01
sohighthesky15-Nov-10 19:01 
Questionjcarousel not working Pin
wajans6-Nov-10 2:16
wajans6-Nov-10 2:16 
AnswerRe: jcarousel not working Pin
wajans7-Nov-10 19:33
wajans7-Nov-10 19:33 
GeneralRe: jcarousel not working Pin
Not Active8-Nov-10 2:35
mentorNot Active8-Nov-10 2:35 
AnswerRe: jcarousel not working Pin
Eaverae9-Nov-10 20:32
Eaverae9-Nov-10 20:32 
Questionneed Javascript to calculate day difference for dd-mm-yyyy hh:mm:ss(AM/PM) Pin
Alok Sharma ji29-Oct-10 21:24
Alok Sharma ji29-Oct-10 21:24 
hi i am using a javascript to calculate checkin checkout times of customer by using this script:
function calculate()
            {
                if(window.formSugam.txtunitcost.value!="" && window.formSugam.txtquantity.value !=""){
                    //-----------function for checking date and their validations
                    var ONE_DAY = 1000 * 60 * 60 * 24;
                    str1=new Array(6);
                    str2=new Array(6);
                    str1 = EnterDateInDDMMYY(window.formSugam.txtfromdate.value);
                    // EnterDateInDDMMYY method is to convert date into miliseconds
                    str2 = EnterDateInDDMMYY(window.formSugam.txttodate.value);
                    var date1=new Date(str1[0],str1[1],str1[2],str1[3],str1[4],str1[5]);
                    var date2=new Date(str2[0],str2[1],str2[2],str2[3],str2[4],str2[5]);
                    var datediff=date2-date1;                                        
                    checkFloat(formSugam.txtunitcost)
                    checknumbervalue(formSugam.txtquantity)
                    val2=parseFloat(window.formSugam.txtunitcost.value );
                    val1=parseInt(window.formSugam.txtquantity.value );
                    dateval=parseInt(datediff);
                    val3=parseInt(Math.round(dateval/ONE_DAY));
                    if (val3==0)
                    {window.formSugam.txtbillamount.value=val1*val2;}
                    else{
                    window.formSugam.txtbillamount.value=val1*val2*val3;
                    }
                    //----------------hence it calculates date in round figure
                }



but the problem comes when i calculate a date diff for 31-10-2010 12:39:52PM to 01-11-2010 12:39:52PM

else its working fine so what is the actual problem here in my code is related to month change,
AnswerRe: need Javascript to calculate day difference for dd-mm-yyyy hh:mm:ss(AM/PM) Pin
Sunasara Imdadhusen1-Nov-10 2:23
professionalSunasara Imdadhusen1-Nov-10 2:23 
QuestionJavascript Inoperative only in Explorer Pin
PDTUM29-Oct-10 19:17
PDTUM29-Oct-10 19:17 
AnswerRe: Javascript Inoperative only in Explorer PinPopular
NeverHeardOfMe29-Oct-10 22:57
NeverHeardOfMe29-Oct-10 22:57 
GeneralRe: Javascript Inoperative only in Explorer Pin
Sunasara Imdadhusen1-Nov-10 2:16
professionalSunasara Imdadhusen1-Nov-10 2:16 
AnswerRe: Javascript Inoperative only in Explorer Pin
PDTUM1-Nov-10 8:55
PDTUM1-Nov-10 8:55 
QuestionJava Script Error Pin
MathewPV29-Oct-10 19:14
MathewPV29-Oct-10 19:14 
AnswerRe: Java Script Error Pin
Not Active31-Oct-10 4:26
mentorNot Active31-Oct-10 4:26 
AnswerRe: Java Script Error Pin
Sunasara Imdadhusen1-Nov-10 2:14
professionalSunasara Imdadhusen1-Nov-10 2:14 
GeneralRe: Java Script Error Pin
Ankur\m/18-Nov-10 2:11
professionalAnkur\m/18-Nov-10 2:11 
QuestiondeleteRow() weird behavior, deletes two rows. Pin
da808wiz28-Oct-10 15:36
da808wiz28-Oct-10 15:36 
AnswerRe: deleteRow() weird behavior, deletes two rows. Pin
sohighthesky15-Nov-10 19:40
sohighthesky15-Nov-10 19:40 
GeneralRe: deleteRow() weird behavior, deletes two rows. Pin
da808wiz16-Nov-10 6:55
da808wiz16-Nov-10 6:55 
Questionget controls using name Pin
i gr827-Oct-10 21:30
i gr827-Oct-10 21:30 
AnswerRe: get controls using name [modified] Pin
Sunasara Imdadhusen27-Oct-10 22:53
professionalSunasara Imdadhusen27-Oct-10 22:53 
AnswerRe: get controls using name Pin
moocr.com1-Nov-10 15:27
moocr.com1-Nov-10 15:27 
AnswerRe: get controls using name Pin
jaypatel51214-Nov-10 8:02
jaypatel51214-Nov-10 8:02 
QuestionHow to handle events in Pocket Internet Mobile Pin
Rahul Chitte26-Oct-10 22:21
Rahul Chitte26-Oct-10 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.