ColdFusion cflocation to new tab

1k Views Asked by At

How can I use cflocation to open new tab?

I submit a form, then it should open a new tab and redirect the original page. Is it possible?

<cfform ACTION="./test.cfm" METHOD=POST>

Then in the test.cfm

    <!-- Some database update here -->

<!--- I would like to open it in new tab --->
<cflocation url="newTab.cfm" addtoken="false">

<!--- Then refirect the current page to new link --->
<cflocation url="redirect.cfm" addtoken="false">

Is it possible to be done?

Thanks

1

There are 1 best solutions below

3
On

The closest you can get is

<cfform ACTION="./test.cfm" METHOD=POST target="_blank"
    onsubmit="window.location('redirect.cfm')">

The user's browers might go into a new tab.

Per Dan

The rest of this equation is

onsubmit="window.location('redirect.cfm')"