echo javascript messagebox problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
greedyisg00d
Forum Commoner
Posts: 42
Joined: Thu Feb 12, 2009 2:48 am

echo javascript messagebox problem

Post 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
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: echo javascript messagebox problem

Post by califdon »

Depends on where this javascript is inserted in the document.
Post Reply