This topic is locked
[SOLVED]

 Button instead of link to inline edit

11/27/2011 6:01:38 AM
PHPRunner General questions
G
giwi_dev author

Dear all,
I need to change my detail page link into a button, i've been through the forums 4 times now but i can't get it done.
My detail link in the HTML page of the master list looks like
<A {$GetUserDetails_dtablelink_attrs}>Change</A>
And I know i need something with an input type and the after record processed event page but not sure how
Thanks

Brian

G
giwi_dev author 11/30/2011

Getting closer to what I'm looking for
Found this thread

http://www.asprunner.com/forums/topic/11082-how-to-redirect/
And a solution
global $record;

$editlink=" editid1=".htmlspecialchars(rawurlencode($data["RecordID"]));

$record["editlink_attrs"]="href=\"custom_page_customers_edit.php?".$editlink."\" ";
I changed the RecordID and the editlink_attrs fields to my needs now it shows the custom edit page in popup just what I want.

However it shows a >>> button even though there is only one detail record and goes to a second record if you click it unrelated to the master record.

And i'm not in a popup even though edit in popup is enabled in the custom details page, this works if you open the edit link from the detail page itself.
If you go back to the list it will go back to the list page of the detail link not what you want, i want to go back to my master list page.
Any help on that?

G
giwi_dev author 11/30/2011

found another useful post

http://www.asprunner.com/forums/topic/17019-open-javascript-popup-window-then-automatically-close-it-after-saving-it/
I added the JavaScript popup code in the HTML page of the master list instead of a php scriptlet ( i tried this 2 days ago but never got that working)
The other 3 steps remained the same, the result is a custom button that pops up the custom edit detail page.
The last thing is refreshing my master list after closing the custom detail popup.

G
giwi_dev author 11/30/2011

completing the refresh of the list page after closing the popup can be done with this tip

http://www.asprunner.com/forums/topic/7585-add-new-in-popup/
if ($_REQUEST["submit2"]=="Save and back to list")

{

echo "<script type=\"text/javascript\">opener.location.reload(true);window.close();</script>";

exit();

}
I learned to shut down phprunner between sessions, some things are correct but not working, saving, closing phprunner and re-opening the project helps