7 years ago
3
Topic

Hi,

   I need to call a php script by free button into the content view of a form without leave the view. I have tried to add javascript like that:

function test(){
$.get("/my_path/my_script.php");
return false;
}

and call it from free button without success. How I can perform this action? Is free button the solution, how and where set the code.

Thank you in advance for your answer,

Gerard

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
2
Level 1

You can't run php code in usual fields. You need to use field 42 or https://www.seblod.com/store/extensions/1854

7 years ago
1
Level 2

Hi Klas,

I use this extension, into link part of free button I choose "Javascript custom" and add following code:

test()

Into a JavaScript code I add following code:

<iframe src="JavaScript:''" style="height:0px" name="iframename"></iframe>

function test(){
window.frames['iframename'].location.replace('http://....../test1.php');
return false;
}

This solution don't work. The aim is just to call php script with button without leave the page. The execution of php script must be performed in a transparent way for user.

Thank you in advance for your help.

Gérard

4229 Posts
Kadministrator
7 years ago
0
Level 3

There is no readymade solution for this, you can use Seblod services and developer will do this for you.

Get a VIP membership