Is it possible to dynamically change a directory name in <audio src=?
In the example below I would like to change the value of an expression like "$lang_dir" to equal the sub-directory name "english" or "spanish".
<audio src="http://incentivesonline.com/ivr/$lang_dir/welcome.mp3">
<!-- Play prompt in English or Spanish.
</audio>
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Dynamically change a directory name
dynamically change a directory name in IVR application
Hello,
Are you asking how to accomplish this IVR function using server side scripting, or within the document using ECMAScript? For server side scripting (using PHP) you would just use PHP's built-in variable functionality:
In the case of ECMAScript you can store the value in a variable and use the srcexpr attribut of the <audio> tag to dynamically reference the audio file. This attribute allows you to contatenate strings to create the complete URL:
Regards,
Plum Support
Are you asking how to accomplish this IVR function using server side scripting, or within the document using ECMAScript? For server side scripting (using PHP) you would just use PHP's built-in variable functionality:
Code: Select all
<?php
$lang_dir = 'english';
?>
<audio src="http://incentivesonline.com/ivr/<?php echo($lang_dir)?>/welcome.mp3"/>
Code: Select all
<var name="lang_dir" value="'english'"/>
<audio srcexpr="'http://incentivesonline.com/ivr/'+lang_dir+'/welcome.mp3'"/>
Plum Support