Anyway to delay JS call?
Posted on 2009-04-29
This is what I have:
I have a hidden field on an aspx page. I have a sumbit button. I do a database save on the click event and get an OrderID.
BUT,on Onclick event of the button, i first call a JS function. When I call this JS, I still dont have the OrderId.
JS function gets called it, that's why the hidden field is empty.
Anyway to call this JS AFTER I get the orderID??
alert(document.getElementById('ctl00_Body_orderIdHidden').value); //This is EMPTY
window.opener.location.href = "POrder.aspx?" + document.getElementById('ctl00_Body_orderIdHidden').value;