This topic is locked

Navigate from Master_List to Child_edit

8/22/2008 11:25:54 AM
PHPRunner General questions
M
mrpeeble author

Could anyone please tell me how I can navigate from the Master_List page directly to the Child_edit without having to go to the Child_list page first
Once on the Child_edit I need to hit the èBack to List link and go right back to the Master_List again bypassing the Child_list
I also need the Back to Master Table link on the Child_edit
Any assistance would be greatly appreciated.
tom

J
Jane 8/25/2008

Hi,
just turn on HTML mode on theVisual Editor tab and edit links manually.

Here is a sample:

<A class=tablelinks id=master_DetailTable{$row.1recno} href="DetailTable_edit.php?editid1={$row.1FieldName_value}&{$row.1DetailTable_masterkeys}" {if $useAJAX} onmouseover="RollDetailsLink.showPopup(this,'DetailTable_detailspreview.php'+this.href.substr(this.href.indexOf('?')));" onmouseout="RollDetailsLink.hidePopup();" {/if}>DetailTable</A>


Don't forget to fill session variables in the Edit page: Before process event on the Events tab:

global $strTableName;

if (@$_REQUEST["mastertable"] && @$_REQUEST["masterkey1"])

{

$_SESSION[$strTableName."_mastertable"] = $_REQUEST["mastertable"];

$_SESSION[$strTableName."_masterkey1"] = $_REQUEST["masterkey1"];

}

M
mrpeeble author 8/29/2008

Hi,

just turn on HTML mode on theVisual Editor tab and edit links manually.

Here is a sample:
Don't forget to fill session variables in the Edit page: Before process event on the Events tab:


Jane,
Sorry but this is not working for me yet.
In my master list.htm I have:
<TD align=middle><INPUT id=check{$row.1recno} type=checkbox value="{$row.1keyblock}" name=selection[]></TD>{/if}{if $allow_cir_main}

<TD align=middle><A id=master_cir_main{$row.1recno}

href="cir_main_edit.php?editid1={$row.1prid_value}&{$row.1cir_main_masterkeys}" {if $useAJAX} onmouseover="RollDetailsLink.showPopup(this,'cir_main_detailspreview.php'+this.href.substr(this.href.indexOf('?')));" onmouseout="RollDetailsLink.hidePopup();"
In my child edit page before process event I have:
global $strTableName;

if (@$_REQUEST["SDP - Daily Payment Review Summary"] && @$_REQUEST["masterkey1"])

{

$_SESSION[$strTableName."_SDP - Daily Payment Review Summary"] = $_REQUEST["SDP - Daily Payment Review Summary"];

$_SESSION[$strTableName."_masterkey1"] = $_REQUEST["masterkey1"];

}
I am getting this error when I run it:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
URL 137.15.236.240/officek/5percent_august2008/cir_main_edit.php?editid1=&mastertable=SDP+%2D+Daily+Payment+Review+Summary&masterkey1=79
The master table is: SDP - Daily Payment Review Summary Primary key = ID

The child table is: cir_main . The foreign key is: prid
I believe that the problem is to do with the editid1={$row.1prid_value}, I have tried other field names from the child table and none work.

I am missing something basic, sorry to be so obtuse. any help would be appreciated.

J
Jane 9/1/2008

Hi,
Please publish your project on Demo Account and send to support@xlinesoft.com a URL to your pages along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.