Hello
I'd like to pass one of my databound custom attributes from an Appointment item to a Javascript function on the click event.
Is this possible?
I've correctly bound the datasource with the custom attibutes and exposed them in the Appointment template.
As for the click event, being a novice at JS, I've tried a few times but may be getting muddled up with the syntax...
ie. I'd like to achieve:
After clicking Appointment (x), execute Javascript function MyClickEvent (attributeValue), where x.AttributeValue is evaluated from the attribute "resource_name" in the Appointment Template:
The Code: variations on:
I'd like to pass one of my databound custom attributes from an Appointment item to a Javascript function on the click event.
Is this possible?
I've correctly bound the datasource with the custom attibutes and exposed them in the Appointment template.
As for the click event, being a novice at JS, I've tried a few times but may be getting muddled up with the syntax...
ie. I'd like to achieve:
After clicking Appointment (x), execute Javascript function MyClickEvent (attributeValue), where x.AttributeValue is evaluated from the attribute "resource_name" in the Appointment Template:
The Code: variations on:
<AppointmentTemplate>
<div class= <%# Eval("Attributes['ClassTag']") %>
onclick="MyClickEvent("<%# Eval("Attributes['resource_name']") %>")" >
</div>
</AppointmentTemplate>
Any guidance appreciated.
Cheers
Paul