Message Boards Message Boards

Cloud CDF and HTTPRedirect


Cross posted on

Question and requirements

Is it possible to HTTPRedirect from a Cloud CDF via e.g. Button action?

  • I need an interactive cloud cdf around it.

  • The action would not only redirect but evaluate arbitrary code prior to that.

  • If it matters the target page does not need to be any page but an arbitrary CloudObject should do.

  • No, I don't want to hide old stuff and show new to the user, I really need to redirect.

  • No, open in new tab does not count.

So it would work analogously to this form's submit button:

    FormFunction[{"go on and submit"}
      , Module[{link}
          , link = CloudPut[RandomReal[], Permissions -> "Public"]
          ; HTTPRedirect[link]
        ] &
  , Permissions -> "Public"


Wasn't able to achieve that, here's why:

  • Form/ApiFunctions where HTTPRedirect works well can't have interative CDFs embedded inside:

             { "this is ok"
             , ExportForm["this is not ok", "CloudCDFElement"]
           , foo
       , Permissions -> "Public"

> enter image description here

  • and I can't trigger HTTPRedirect from cloud CDF, nothing happens:

            Button["Submit", Print[1]; HTTPRedirect[""]], 
          ], Permissions -> "Public"

> enter image description here

POSTED BY: Kuba Podkalicki
11 months ago

Group Abstract Group Abstract