[eluser]Jumps Like A Black Guy[/eluser]
I dont know if this is possible.
I want to know if I can set an auto go back, for different instances?
This is what I mean...
The way the success/error messages display on my site are like this
Code:
<h2><?php echo $this->lang->line('Message_Display');?></h2>
<?php
//Show Flash Message
if($msg = $this->session->flashdata('flash_message'))
{
echo $msg;
}
?>
<!--<p align="center"><input type="button" name="goback" class="clsGoBack" value="<?php echo $this->lang->line('Go Back'); ?>" onclick="history.go(-1)"/></p>-->
If you noticed in the code above they put <!-- --> around the go back button. I tried it because I was wondering why they wern't using it. I found out it doesn't work in a lot of ways.
For instance, when a user logs out a success message shows with the go back button which is a bad idea. Or when a user is logged in and say they just edited there profile, a success message shows up with the back button which is only useful if the user messed up.
Long story short I want to set auto go backs with javascript...
Im guessing this can be done with else statments, but im not sure. When a user is not logged in I dont mind the back button, but I'd like it if when a user is logged in, and say they edit there profile, etc. When they see the success/error message I'd like to auto go back to member account home page, etc.
I know this is long, but im trying to explain what im thinking at the moment the best i can.