This topic is locked
[SOLVED]

 How to open the view on list page and advanced search in Ajax popup

1/17/2009 8:52:12 AM
PHPRunner General questions
hichem author

Does anyone know what part to change to :

1- view on list page would open an ajax popup window instead of a new page with teh details so you have to go back to list if you would like to check something
2-open the advanced seach page (when you click the button on top of any list page) in an ajax popup window instead of the standard way redirecting to a new page.
Can this be done through events or does it require changing some coed in commonfunctions.php?
Many thanks

J
Jane 1/20/2009

Hi,
both these tasks require a lot of custom JavaScript code.

In general you need to edit pages on the Visual Editor tab manually, add List page: Before processevents and edit generated files (for advanced search). Unfortunately we don't have a ready to go solution for this.

hichem author 1/20/2009

Hi,

both these tasks require a lot of custom JavaScript code.

In general you need to edit pages on the Visual Editor tab manually, add List page: Before processevents and edit generated files (for advanced search). Unfortunately we don't have a ready to go solution for this.


Thanks Jane,

So I am assuming there is no easy way to open multiple windows or tabs when you click on view details to see the full record details?
I actually tried to right click in my browser on view details link and open in a new tab or window and it does it without a problem.

Are you sure it's not possible to change the event OnMouseClick somewhere in the common functions for the details page to open in a new tab in my browser? This way at least the main page is not coverd and I can open a number of detail views without covering the main page.

Right clicking on the advanced search does not allow to open it in a separate tab/window though.
Thanks for your help

J
Jane 1/21/2009

Hi,
to open view page in the new window (not Ajax popup) add List page: After record processed event on the Events tab.

Here is a sample:

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

$record["viewlink_attrs"]=" target=_blank href=\"TableName_view.php?".$editlink."\" ";


Also you can open Advanced search in the new window but you'll need to check search parameters, pass it to the main page and close new window with search page manually.

hichem author 1/21/2009

Hi,

to open view page in the new window (not Ajax popup) add List page: After record processed event on the Events tab.

Here is a sample:
Also you can open Advanced search in the new window but you'll need to check search parameters, pass it to the main page and close new window with search page manually.


Thanks Jane, I tried your code and it still opens the page in the same window.

I have replaced the $data["RecordID"] with my table key $data["RECORD_ID"] and also replaced the TableName_view.php and added the code under list page function BeforeMoveNextList(&$data,&$row,$col) (corresponding to after record processed). Anyone else tried this?

What am I doing wrong?

(in my view page it is showing RECORD ID -without underscore- but I am assuming that'S just displaying an alias as the field name is RECORD_ID which is set as primary key)

many thanks

J
Jane 1/22/2009

It's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.