Aloha
I'm trying to build a container with a voice reader service that has the following details:
A Button to activate the voice reader and read the content specified within an HTML elemnt (ex.<div>)
After pressing the button, the external voicereader service gets the Absolute URI and the HTML Element ID that he's instructed to read.
Example: <div id="rs_123">some text</div> at http://someserver/dnn/Home/tabid/40/portalid/0/Default.aspx
the id "rs_123" has to be an unique and permanent ID for the HTML element, otherwise the voicereader will not find the specific content to read.
I'm currently generating that ID using the ModuleID property, but using this property obligates me to change the cachetime of the TEXT/HTML module to 0 seconds as an alternative to the default 1200 secs, otherwise every http request will return a null ModuleID.
The present code is:
01.
<% Dim ConModule As DotNetNuke.Entities.Modules.ModuleInfo = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(Me).ModuleConfiguration%>
02.
<
div
class
=
"TituloPicotado"
id="ler_<%= ConModule.ModuleID%>">
03.
//....
04.
<
div
id="readspeaker_button_<%= ConModule.ModuleID%>" class="rs_skip">
06.
target="_blank" onclick="readspeaker(this.href+'&selectedhtml='+escape(selectedString), 'rs_<%= ConModule.ModuleID%>'); return false;">
08.
alt
=
'Ouvir com ReadSpeaker'
title
=
'Ouvir com ReadSpeaker'
/></
a
>
09.
</
div
>
10.
<
div
id='rs_<%= ConModule.ModuleID%>'>
11.
//content
12.
</
div
>
Can anyone advice me with some other way besides the ModuleID to define a unique and permanent ID to the html element and not having to put all HTML/TEXT with a 0 seconds default cache time ?
Thank you