How to pass parameter to SC from javascript

Hi

I have a server connect to handle my s3 upload, and i want to triger it from javascript (from official dropzone). I have read that i should call dmx.parse(‘upload.load()’) … its working but how to pass the 2 Post parameters expected by the SC ?

Thnaks in advance

fabrice

In the URL?

?var1=xyz

Then they will be $_GET variables in SC.

1 Like

fair enought ... should work.

Hello guys!

I’m trying to pass 3 get params to a SC from Javascript. The SC loads, but the get params are not.
To check if I’m concatenating right, I used console.log and the result is:

content.conditional4.conn_insert_update_job.load({job_id:192 , action:'add-job', home_id:94}))

Below, the js snippet :

if (ruleaction == "add-job") {

        var_home_id = dmx.parse("content.conditional4.inp_home.value");

        var exec_insert = dmx.parse("content.conditional4.conn_insert_update_job.load({job_id: " + job_id + " , action: 'add-job', home_id = " + var_home_id + "})) ")
        console.log("content.conditional4.conn_insert_update_job.load({job_id:" + job_id + ", action:'add-job',home_id:" + var_home_id + "}))")

}

What am I missing?
Have a great week, folks!

The home_id argument is using an equals sign but needs a colon. See if that clears it up.

oh my god…I need more coffee…I only changed the console.log string… :frowning:
Thanks Ken!!

1 Like