DMXzone App Connect Support Product Page

Run a server action from a javascript function

Asked 02 Oct 2017 20:00:34
1
has this question
02 Oct 2017 20:00:34 Hans Haverlach posted:
I have this complex page with a planning scheduler.
Oncompleting the planner, the user hits the save button.
Since all the input field a dynamically generated and differ from the total of fields depending on the chosen week,
I needed a javascript function to loop through the rows and bind the field values into variables.
These variables are the GET values for the server action file.

After the variables are set, I like to RUN a server connect action and give the field values as options.
I tried this: (simplified version)

function savefunction() {
var1 = "here comes field value 1";
var2 = "here comes field value 2";
var3 = "here comes field value 4";
sv_insertplanning.load({ //->this is the dmx-app connect name of the the server action file
				rs_ouderid: var1,
				rs_datumoverblijf: var2,
				rs_obgroepid: var3
			});


}


But that does not work.
Is there an option to start a server action file on dmx-connectpage from within a javascript function?
Thank you for any reply!

Replies

Replied 04 Oct 2017 12:58:19
04 Oct 2017 12:58:19 Teodor Kuduschiev replied:
Hello Hans,
Unfortunately it is not possible to run server actions like that, they should be called from within dynamic events option in App Connect.
Maybe if you explain what exactly do you have on the page, and what needs to be done we could find a way of doing this entirely in app connect.

Reply to this topic