After the user submits data i use a javascript confirm to see if they want to redirect.
<?php
//code in here grabs variables etc...
?>
if(confirm('Is this info correct? '))
{
alert("New user has been added!");
}
else
{
parent.location='site to go to';
alert("Action canceled");
}
</script>
<?php
//more php code to be executed
?>
if the user hits okay on the prompt then the php code below this script should be executed. It does but then the page refreshes after hitting "okay" and some of the elements does not show up correctly. such as the background which should be blue from a css style sheet is partially white. Any ideas are greatly appreciated.