Open Download event in new window

sagraphics 05 Nov, 2012
I have a small form where on submit, the form opens an inline download - how do I get this to open in a new blank window?
Max_admin 05 Nov, 2012
Hi,

You should use some javascript to open a new window with the link to the file download.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sagraphics 05 Nov, 2012
I am not massively experienced with javascript - could you provide an example and where I should put it?
Max_admin 06 Nov, 2012
Here are some hints:

#1- add the JS code inside "load JS" action in the "on submit" event.
#2- Add the File downloader action inside a new form event, call it "download" for example.
#3- the JS code should open a new window and the window URL should be the form URL + "&event=download".

JS code example from Google:

popupWindow = window.open('FORM_URL_HERE','name','width=200,height=200');
popupWindow.focus();


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sagraphics 07 Nov, 2012
I have tried putting the js in, but the form doesn't have a url because it is a plugin inside an article. Also, file downloader doesn't allow me to enter a name for the action...any ideas?
Max_admin 08 Nov, 2012
Hi,

Please copy the form URL from the "Frontend view" link in the forms manager.

I mean to create a new form event then drag your file downloader inside that new event, so that the download is accessible through:

form_frontend_viewlink_here&event=download

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sagraphics 08 Mar, 2013
I successfully managed to set up the download (open link)function, but the problem is that it opens in a popup rather than a new window or tab, and popups can be blocked. Any help would be appreciated.
This topic is locked and no more replies can be posted.