About Wating A Few Miliseconds

Jul 23, 2005

In somewhere in my code, i try to load an xml file, the problems is that
the sentence xmlDoc.load('file.xml') takes some time in finish, but
mozilla continues interpretating the code, so uses xmlDoc when it is not
loaded.

Is there any way of waiting some time (like Thread.sleep or Thread.wait
in Java)???

If i could i would wish not to use setTimeout()

View 1 Replies


ADVERTISEMENT

Going From UTC Miliseconds To Regular Date String?

May 23, 2006

the first thing i do is convert the date to miliseconds, add 4 weeks worth of miliseconds to it now i want to convert back, but this is where i am stuck.

function start_to_enroll(){
var miliDay = 86400000;
var startField = document.getElementById('start_date');
var enrollField = document.getElementById('enroll_date');

startField.
mili4weeks = 28 * miliDay;
miliDate = utc_date(startField.value);
total = miliDate + mili4weeks;

}
}

i just want to put total back to a date string i tried total.getUTCMonth etc. but it returns undefined.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved