Close modal window on submit

skittle 05 Nov, 2014
I have successfully used the following javascript to close my CFv4 forms after the user presses Submit -

window.setTimeout('closeme();', 200);
function closeme()
{
window.parent.document.location.reload();
parent.SqueezeBox.close();
}


The code is included in a Load Javascript action after DB Save in the On Submit event.

This appears to have no affect in my CFv5 forms when displayed modally. How can I achieve the same effect in CFv5?

Thanks in advance,

John
GreyHead 06 Nov, 2014
Hi John,

Ive no idea - this look like code that is related to the Modal window, not to the form. Do you see any JavaScript errors? Is Joomla! 3 using SqueezeBox for modal windows- I suspect not?

Bob
skittle 06 Nov, 2014
Hi Bob,

Thanks for the quick response.

To answer your questions -

I see no JS errors.

I am using both CFv4 and CFv5 forms in a single Joomla 3 site. The CFv4 forms close on submit when displayed modally with the JS code that references SqueezeBox so the code works with Joomla 3 - Joomla 3 seems to be using SqueezeBox.

John
GreyHead 06 Nov, 2014
Hi John,

OK - thanks for checking that out. Please post a link to the form so I can take a quick look.

Bob
skittle 06 Nov, 2014
Thanks.

Here is a link to the form. Of course this is a direct link and will not show the form modally. If you need to see the form running modally I will give you access to the system.


http://clasp.preflightinfo.com/index.php?option=com_chronoforms5&tmpl=component&chronoform=ACAircraftEdit
GreyHead 08 Nov, 2014
Hi John,

Thanks for the link but, as I said I think it's a problem with the modal window code so looking at the form alone doesn't tell me anything.

Bob
skittle 11 Nov, 2014
Hi Bob,

I am sending you a PM with my website login credentials so you can see the problem.

Thanks,

John
skittle 20 Nov, 2014
I still haven't solved this problem. Any ideas?

Thanks,

John
This topic is locked and no more replies can be posted.