mikelinox
Posts: 3
|
Posted: 04/26/2007, 4:52 AM |
|
Hi dudes,
I have a doubt in the javascript. For example i am having the following code in javascript which happens after a button click;
<script language="javascript" type="text/javascript">
function callsubmit(act)
{
if (act == "ren")
{
alert("First option Succeed");
}
else
{
alert("Second option succeed");
}
setTimeout('alert("Hai")',2000);
document.frm.submit();
}
</script>
The problem i am facing in the above script is i am not even getting the alert message after 2 seconds. My requirements is that it should give the alert message "Hai" after 2 seconds and then afterwards the form should be submitten.
can anyone suggest me a solution for it.
Thanks & Regards,
Michael
_________________
"The quickest way to achieve self-confidence is to do exactly what you are afraid to do" |
|
|
matheus
Posts: 386
|
Posted: 04/26/2007, 5:01 AM |
|
Where is Codecharge relation?
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
|
|
mikelinox
Posts: 3
|
Posted: 04/26/2007, 6:17 AM |
|
Hi Matheus,
I dont get problem with calling these function. I need to have clarification on the above code only. In the above code, the alert message "Hai" should appear after 2 seconds and then on clicking the alert message the window needs to be submitted.
Thanks & Regards,
Michael
_________________
"The quickest way to achieve self-confidence is to do exactly what you are afraid to do" |
|
|
matheus
Posts: 386
|
Posted: 04/26/2007, 10:37 AM |
|
I think setTimeOut is like send a thread, it will do submit before 2 seconds.
It's my thing.
But, what I say in previous post is that this wasn't correct forum. Had million forum from Javascript in Web, but not Java with Codecharge.
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
|
|
|