Related form, redirection question
I have a main table (with a Main Form: tbl_mi_details_detail.php) and a related table with a related Form: (tbl_names_insert.php).
I have a slight problem with re-direction after an Insert Action in the Related Form.
The related Form has an action in the form tag of:
<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>
And an Insert Record 'After Insert' Server Behavior 'Go to' of:
tbl_mi_details_detail.php?RefNo=<?php echo ((isset($_POST["Insert_ID"]))?$_POST["Insert_ID"]:""); ?>
And a Cancel button:
<input type="button" value="Cancel" class="formButton" id="cancel" name="cancel" onclick="document.location.href='tbl_mi_details_detail.php?RefNo=<?php echo ((isset($_SESSION["Insert_ID"]))?$_SESSION["Insert_ID"]:""); ?>';" />
After inserting a new record I need to return to the Main Form with a url parameter and show the main record - as per the Cancel button above (the cancel button works correctly)
However, when I insert a record in the Related Form, the record is written to the related table but no re-direction back to the main form takes place i.e. the 'After Insert' Server Behavior does not seem to fire? (the trigger is 'Button: Current Page Submit')
I'm sure that I'm missing something simple here - any suggestions on how I get the GoTo working?.