This topic is locked
[SOLVED]

 Add Button to List View

3/19/2011 9:01:33 PM
PHPRunner General questions
C
cjsaputo author

I would like to add a button at the end of the line in the list view, which only shows the first five fields, so that I can jump to the details preview to show all the fields. I have tried doing this by adding a column at the end of the row and inserting a button. Then I edited the code to display the details preview screen. However, when I display the list view screen it never completely loads. The loading graphic stays on the screen. Any help would be appreciated.
This is the button code:

header( 'Location: histroic_district_detailspreview.php' ) ;

// Uncomment the following line to prevent execution of "Server" and "Client After" events.

return;

Sergey Kornilov admin 3/21/2011

Instead of inserting a button I recommend to add a new dummy field to SQL query and make 'View as' type of this field 'Custom'. In custom code you can display a hyperlink that looks like a button and redirect user to the details page.
The advantage of using 'View as' type 'Custom' is that you can access any field value that belongs to this record. I guess you need to pass record ID to make this work.

C
cjsaputo author 3/21/2011



Instead of inserting a button I recommend to add a new dummy field to SQL query and make 'View as' type of this field 'Custom'. In custom code you can display a hyperlink that looks like a button and redirect user to the details page.
The advantage of using 'View as' type 'Custom' is that you can access any field value that belongs to this record. I guess you need to pass record ID to make this work.



Can you explain why the screen won't finish loading?

Sergey Kornilov admin 3/21/2011

There is some kind of error in your code that prevents list page of loading. Probably you inserting PHP code into Javascript ClientBefore event of your button.
Cannot tell for sure without seeing the whole application.

C
cjsaputo author 3/22/2011



There is some kind of error in your code that prevents list page of loading. Probably you inserting PHP code into Javascript ClientBefore event of your button.
Cannot tell for sure without seeing the whole application.


The following is the error I get on the page: Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; GTB6.3; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; AskTB5.6)

Timestamp: Tue, 22 Mar 2011 21:13:24 UTC
Message: 'myColumnDefs[...].key' is null or not an object

Line: 24

Char: 2

Code: 0

URI: http://oaklandregionalhistoricsites.com/orhs%20input/include/resizebleGrid.js

Sergey Kornilov admin 3/22/2011

How do you want us to help you with this?