arnor@icetips.com
Member
Hi guys,
Is there a way to get the joomla table prefix in FORM Javascript files placed in the "\components\com_fabrik\js" folder?
I have a couple of js files that set a URL for a button and need to construct a URL filter:
Any chance of getting the prefix so I can substitute "pre" with the actual prefix?
Could I add a "global" variable in JS using php to generate something like this in one of the event handler for the php plugin?
Best regards,
Arnor
Is there a way to get the joomla table prefix in FORM Javascript files placed in the "\components\com_fabrik\js" folder?
I have a couple of js files that set a URL for a button and need to construct a URL filter:
JavaScript:
var form = Fabrik.getBlock('form_11', false, function(form) {
var el = form.elements.get('pre_mytable___my_id');
var val = el.getValue();
// more code
}
Any chance of getting the prefix so I can substitute "pre" with the actual prefix?
Could I add a "global" variable in JS using php to generate something like this in one of the event handler for the php plugin?
PHP:
$joomlaPrefix = JFactory::getApplication()->application->get('dbprefix');
return('<script>var joomlaPrefix = "' . $joomlaPrefix . '"</script>');
Best regards,
Arnor