Hi.
I found a couple of previous posts with this subject but can't figure out from them how to do it.
I have a page with a popup to upload an image. this all works fine and the popup gives the confirmation the file has uploaded but when I close the popup I have to manually refresh the main page for it to show the uploaded image.
Is there a way to refresh the page?
Main Page
sp_DBR_View_Order
select 'dbr.report', 'sp_DBR_Upload_Picture', '[Preview]', 'CUSTID=CUSTID', "event=click|dblclick", 'popup';
-----------------------
First upload page
DROP PROCEDURE IF EXISTS sp_DBR_Upload_Picture
$$
CREATE PROCEDURE `sp_DBR_Upload_Picture`(Order_ID int)
BEGIN
select 'dbr.upload.options', 'accepted_files', '.gif, .jpg, .jpeg, .HEIC';
select 'dbr.upload.options', 'add_time', 1;
select 'dbr.upload', '//var/www/vhosts/73/690027/path_to_image_directory/', 'sp_DBR_upload_file', Order_ID;
select 'dummy';
END
$$
-------------------
confirmation page
DROP PROCEDURE IF EXISTS sp_DBR_upload_file
$$
CREATE PROCEDURE `sp_DBR_upload_file`(
in_path varchar(255),
in_file varchar(255),
in_size int,
Order_ID int,
inLogin varchar(128)
)
begin
insert into uploads
values ('',inLogin, in_path, in_file, in_size, Order_ID, now());
select concat('File ', in_file, ' uploaded ');
select 'dbr.refresh';
end
$$
--------------------------
Your help is appreciated.
Many thanks
James