Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satishgumudavelli/9c4527d2760185a4be315b6ef5c24f95 to your computer and use it in GitHub Desktop.
Save satishgumudavelli/9c4527d2760185a4be315b6ef5c24f95 to your computer and use it in GitHub Desktop.
Write html in php.txt
$html .= <<<EndHTML
<script>
require(['prototype'], function(){
Event.observe($('carriers_tablerate_condition_name'), 'change', checkConditionName.bind(this));
function checkConditionName(event)
{
var conditionNameElement = Event.element(event);
if (conditionNameElement && conditionNameElement.id) {
$('time_condition').value = '_' + conditionNameElement.value + '/' + Math.random();
}
}
});
</script>
EndHTML;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment