This topic is locked

popup windonw for add/edit

4/2/2008 11:06:26 AM
PHPRunner General questions
G
garethp authorDevClub member

Hi
phprunner4.2 build 368.
Is there any way to have a popup window for the add and edit screens instead of opening a completely new page?
Hope someone can help
Many thanks

J
Jane 4/3/2008

Hi,
to open add/edit pages in popup window edit list page in the HTML mode on the Visual Editor tab.

Use window.open instead of window.location method.
Also you'll need to add some JavaScript code to the After record added and After record updated events on the Events tab to close opened popup window and update parents' list page.

G
garethp authorDevClub member 4/3/2008

Thanks Jane for the response.
I completely understand the changes required to vivual editor.
Unfortunately I am not a prgrammer and therefore do no know or understand Java script.
Can you (or anyone else) help with the event code that is required to allow the popup to work?
Many thanks for the great support
Gareth

J
Jane 4/3/2008

Gareth,
here is a sample:

?><script>

opener.location.reload(true);

self.close();

</script><?php

K
kklh 4/4/2008

Hi
Could you plase tell me where the window-function should be changed in the code.
regs. Kim.

G
garethp authorDevClub member 4/4/2008

Hi
I did it following the code changes from another topic...
http://www.asprunner.com/forums/index.php?showtopic=8031
...but only tried it for view record (not add/edit).
However it did not do what I was expecting. I wanted a popup window like iBox for images whereas what I achieved was to open a completely new exporer window.
I was hoping to achieve the same as the calender template add new record and view record.
Can anyone help with how to achieve this - sorry to be so useless.
Gareth

J
Jane 4/4/2008

Gareth,
to create add/edit pages as small windows in the Calendar template you need to add a lot of JavaScript code to your pages and List Page: After record processed event on the Events tab.

It's not an easy task. You should be familiar with PHP and JavaScript for that.

G
garethp authorDevClub member 4/4/2008

Thanks Jane - I had better leave well alone then!!!
Think this would be a great feature for future builds for view/add/edit screens.
Take care and have a nice weekend - thanks for all the help

J
Jane 4/4/2008

Gareth,
thank you.

We'll add this feature to our suggestion list.