Hi people,
don’t be afraid of the PHP in the subject it’s definitely a JS question ![]()
I try to close a (popup)window at the end of a piece of PHP code, why is this? Before the windows is closed a MySQL query has to be done.
in preference the window has to close without clicking an extra time.
this is what I was trying:
$query = "UPDATE ledenlijst SET edited='$login', lid='0' WHERE ID = '$delid'";
$ok = mysql_query($query);
if(!$ok)
{die('MySQL error'.mysql_error().'<br>');}
echo('JavaScript:eval(window.close(););');
this has only as a result that the JS line:
JavaScript:eval(window.close(););
is echoed in the window but not executed…
I tried without the eval(); too, but that doesn’t work either. I understood that eval(); is executing code??
I’m not at all an expert in JS so probabely I’m just forgetting something here.
thx in advance,
greetz,
koen