This topic is locked
[SOLVED]

 Refresh after inline Add

2/15/2010 11:52:17 AM
PHPRunner General questions
M
MaxxaM author

I knew how to do this in 5.1 with code below in the inlineedit.js script after calcTotals();
if(!$("a[@id^=save_]",window.parent.document).length)

window.parent.location.href=window.parent.location.href.substr(0,window.parent.l

ocation.href.length-1);
5.2 inlineedit.js is completely different and if I try to add the code in, the page hangs on load. How do you accomplish the same thing in 5.2? Thank you!
P.S., I also tried adding redirect code in the after record added...that doesn't work either.

M
MaxxaM author 2/15/2010

Ok...actaully the code in inlineedit.js is much easier to understand, so after playing with it, I figured out how to do it and am passing it along. Correct me if there is an easier/better way of doing it.
In the inlineedit.js, search for:
this.afterDataSavedi;
Add this directly after:
window.parent.location.href=window.parent.location.href;
So the code should look like this when finish...line before and after to give you an idea:
this.afterDataSavedi;
window.parent.location.href=window.parent.location.href;
if(this.afterRecordEdited)

R
Rens1976 2/15/2010

Thanks Maxxam

This is going to be very useful.

J
Jane 2/16/2010

Hi,
also you can find following line in the inlineedit.js file:

this.calcTotals();



and add this code just after:

this.addListener('add_saved',function(recid){...});



Replace ... with your actual code.