Hi Frendz,
I'm using the following code for generating the alert message.

echo '<script>alert("Your project has timed out. Contact your project Manager")</script>';

Its working fine in my local server. But in online server its not working. whats going wrong with this?

Recommended Answers

All 11 Replies

I am not sure but try with lang attribute

echo '<script lang="javascript">alert("Your project has timed out. Contact your project Manager")</script>';

I am not sure but try with lang attribute

echo '<script lang="javascript">alert("Your project has timed out. Contact your project Manager")</script>';

Ok Thanks... I'll try this and let you know the result...

Member Avatar for P0lT10n

Maybe with this code ?

echo '<script>alert("Your project has timed out. Contact your project Manager");</script>';

I am not sure but try with lang attribute

echo '<script lang="javascript">alert("Your project has timed out. Contact your project Manager")</script>';

I have tried this in server. Its not working.

Maybe with this code ?

echo '<script>alert("Your project has timed out. Contact your project Manager");</script>';

with this also not working...

Member Avatar for P0lT10n

Post the entire code where it is...

Post the entire code where it is...

if($proj1!="")
			{
				$ahours1=getActualHours($proj1);
				$ehours_arr1=explode("#*#",getEstimatedHours($proj1));
				$ehours1=$ehours_arr1[0];
				$edate1=$ehours_arr1[1];
				if(($ahours1!='' || $ahours1!=0) and $ehours1!='' and $edate1!='')
				{
					if($ahours1>=$ehours1 || strtotime($edate1) < strtotime(date("Y-m-d")))
					{
						$sess1='';
						echo '<script type="text/javascript">alert("Your project has timed out. Contact your project Manager");</script>';
					}
					else
					{
						$sess1=$proj1.':'.$desc1;
					}
				}
				else
				{
					$sess1=$proj1.':'.$desc1;
				}
			}
Member Avatar for P0lT10n

Try this

echo '<script type="text/javascript">function alert_time(){ alert("Your project has timed out. Contact your project Manager");} alert_time();</script>';

have you tried it on different browsers

Try this

echo '<script type="text/javascript">function alert_time(){ alert("Your project has timed out. Contact your project Manager");} alert_time();</script>';

Ok.. I'll try and let you know the result soon.

Member Avatar for P0lT10n

Ok.. I'll try and let you know the result soon.

Ok ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.