This topic is locked
[SOLVED]

 View Search box in popup from report

8/24/2011 6:51:27 AM
PHPRunner General questions
J
jasonfrew author

Hi All
I would like to add a link to a report page that would open up a search box of a table
I would like the report to stay in the background and the new view page to be in a pop up.
i would like the user to look at the report take a reference number from the report, click on the link the pop up open to the search box. The user enters the reference number into the search box and clicks search. The search results will then be shown in the pop up. The user can move the pop up box and still see the report in the background. i would also like the user to be able to inline add to the information in the pop up.
I have looked through the site but similar questions do not have the solution im looking for.
Regards
Jason

C
cgphp 8/24/2011

You have to write some custom code for that.

You can start from here: http://www.w3schools.com/jsref/met_win_open.asp Check the Example 2.

J
jasonfrew author 8/29/2011



You have to write some custom code for that.

You can start from here: http://www.w3schools.com/jsref/met_win_open.asp Check the Example 2.


Hi thanks for the info. I expected to have to write some custom code. could you provide more information
<html>

<body>
<script type="text/javascript">

myWindow=window.open('','','width=200,height=100')

myWindow.document.write("<p>This is 'myWindow'</p>")

myWindow.focus()

</script>
</body>

</html>
How can i tie this to my question?

C
cgphp 8/29/2011

In the report page, insert a PHP snippet and enter this code:

echo "<script type=\"text/javascript\">";

echo "myWindow=window.open('your_custom_view_list.php','','width=600,height=600');";

echo "mywindow.document.write(\"<p>This is 'myWindow'</p>\");";

echo "mywindow.focus()";

echo "</script>";


Create a custom view (http://xlinesoft.com/phprunner/docs/list_page_options.htm) for the table you want to present as search box. Enable for this new Custom View inline add/edit and search panel. Make this Custom View the URL of the popup window.

J
jasonfrew author 8/29/2011

So if i wanted in a button i would just add that code to the button?

C
cgphp 8/29/2011

If you want it in a button, enter this code in the "Before client":

window.open('your_custom_view_list.php','','width=600,height=600');


Leave as blank page the "Server" and "Client after" sections.

J
jasonfrew author 8/29/2011

Excellent Both of those solutions work
If i wanted the urn shown on the report to be a link to open the search to the child record attached to the urn displayed in the report how would i create that
Thanks for your help

J
jasonfrew author 9/1/2011

HaHA so when you click the button it says "Hello World !!!" where is this so i can delete?

C
cgphp 9/1/2011

In the "Client after" section of the custom button.