Page 1 of 1

echo javascript messagebox problem

Posted: Sat Mar 21, 2009 1:58 pm
by greedyisg00d
Hi I have a add record page by default and if the user successfully added new records, a javascript messagebox will pop out which my code something goes like this:

Code: Select all

echo "<script type='text/javascript'> window.alert('Schedule successfully added'); window.location='schedulelist.php'; </script>";
My problem is when the messagebox pops out, the page content becomes unorganized or the content is not fully loaded which based from my observation it is caused by the messagebox. Any idea what seems to be the problem?


Thanks

Re: echo javascript messagebox problem

Posted: Sat Mar 21, 2009 2:10 pm
by califdon
Depends on where this javascript is inserted in the document.