I'm trying to use some javascript in the after record added event.
I found some post in the forum that i'm trying to combine together, and running into a snag with the quotes in this echo.
the newly created submit button runs through the things it has to and then runs the php events. I'm taking the old button code that i had in the client after and converting it into the after record added event. Take a look and tell me what I'm doing wrong.
if ($_REQUEST["submit2"]=="Submit")
{
if($_SESSION['Type'] == 'Architect')
{
echo "<script type=\"text/javascript\">
window.opener.$("#value_Architect_Dist_1").val("Arc_newvalue");
window.close();
</script>";
}
else if($_SESSION['Type'] == 'Customer')
{
echo "<script type=\"text/javascript\">
window.opener.$("#value_Customer_Dist_1").val("Cus_newvalue");
window.close();
</script>";
}
else if($_SESSION['Type'] == 'Sales')
{
echo "<script type=\"text/javascript\">
window.opener.$("#value_Sales_Dist_1").val("Sal_newvalue");
window.close();
</script>";
}
else
{
echo "<script type=\"text/javascript\">
window.opener.$("#value_Other_Dist_1").val("Oth_newvalue");
window.close();
</script>";
}
exit();
}