CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Is javascript code processing in a sequential manner?

Print topic Send  topic

Author Message
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"
View profile  Send private message
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
View profile  Send private message
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"
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.