Grid js methods

Hi, why isn’t available programming - js methods in grid? Please consider adding this programming option.

Hello,

I will discuss your suggestion with our team.

regards,
Bernhard

Are this suggestions tracked? Over a month has passed and still nothing

This option is very useful and important. At the moment I already integrated some jQuery scripts and functions in “onscriptinit” and “onapplicationinit”, but does not work properly … I repeat this option is very useful and important. For me, the lack of this option is a very big impediment in the projects that I have. I look forward to an upgrade. It would be great if you can create an option to insert custom javascript code in head section. And last but not least … scriptcase is great! Thank you.

I played a bit and found a solution that works without errors at first look.
Is a solution only if you urgently need to include java script or jquery.
We expect an update that contains this module. :slight_smile:
The script is:

// Caution !!! This script will modify the js file of your grid application
// It will check if is modified and if not will insert your custom script
// Caution !!! This is working only when: “Use Ajax” is checked “YES” in Settings
// Caution !!! If you need or want to use quotes " inside JQUERY or FUNCTION script,
// put an backslash before quotes like in this example alert(“text”);
// or use simple quotes without backslash like in this example alert(‘text’);
// Put this script in “onApplicationInit” in your grid application
// Write your script only between START and END

// *** HERE *** Write the application name ex. grid_example
// ******************************************************************
$app_nm = “grid_example”;
// ******************************************************************

$wrt_js = "<script>

$(document).ready(function(){
custom_script();
});
function custom_script () {
// **************************************************************
// ***************** START EDIT JQUERY CUSTOM SCRIPT *****************

// Example for: <p class=’.abc’> TEST </p> This will show an alert with content of ‘p’ with class: ‘abc’
$(’.abc’).click(function() {
alert ( $(this).html() );
});

// **************** END EDIT JQUERY CUSTOM SCRIPT **********************
// ****************************************************************

}

//**************************************************************************
// **************** START EDIT JAVASCRIPT FUNCTION CUSTOM SCRIPT ****************

// Call this function in html using ex. <p onclick=‘alert_click(“Somethig…”)’ > TEST </p>
function alert_click (msg){
alert (msg);
}

// **************** END EDIT JAVASCRIPT FUNCTION CUSTOM SCRIPT ******************
// *************************************************************************
</script>

";

// *** Do not modify this ***
$app_nm_js = $app_nm."_jquery.js";
$file = fopen($app_nm_js,“r”);
$content = fread($file,filesize($app_nm_js));
$index = strpos($content, ‘custom_script’);
fclose($file);
if(!$index) {
$file = fopen($app_nm_js,“w”);
$content = str_replace(“scAjaxProcOff”,“scAjaxProcOff();
custom_script”, $content);
//fwrite($file, $content);
$wrt_js .= $content;
$wrt_js = str_replace("<script>"," “, $wrt_js);
$wrt_js = str_replace(”</script>"," ", $wrt_js);
file_put_contents($app_nm_js, $wrt_js);
fclose($file);
}

A nice workaround but still we need an update with the js module available

So Scriptcase8 Launched but… a js module missing. Hmmmm

Very important feature

Scriptcase 9… and still missing feature :frowning: