Hi,
I have a custom logic hook that is setting a $_SESSION variable alertflag to a value between 1 -3. Then this is read in the view.detail.php and it calls a specific popup based on the value.
In view.detail.php I have the following code
PHP Code:
echo '<script type="text/javascript" src="custom/modules/Accounts/popups.js"></script>';
if($_SESSION['tempdata']['alertflag']==1)
{
echo '<script> popup(1); </script>';
unset($_SESSION['tempdata']['alertflag']);
}
if($_SESSION['tempdata']['alertflag']==2)
{
echo '<script> popup(2); </script>';
unset($_SESSION['tempdata']['alertflag']);
}
if($_SESSION['tempdata']['alertflag']==4)
{
echo '<script> popup(3); </script>';
unset($_SESSION['tempdata']['alertflag']);
}
My popups.js is in the directory I reference above and this is what it contains.
Code:
function popup(type)
{
if(type==1)
{
alert("one");
}
else if(type==2)
{
alert("two");
}
else if(type==3)
{
alert("three");
}
} This was working perfectly but I cannot see why it is not working anymore, I haven't made anychanges to either file since it was working.
Rgds
Chris
Bookmarks