Skip to Content
0
Former Member
Jun 26, 2015 at 04:22 PM

Custom JavaScript for web templates

23 Views

I have done a little reading and I understand that using Script Item I can add my own JavaScript code to enhance my web template. In order to use document.getElementById command I need to use <span id="myID"> to encapsulate the item that I want to interact with.

However, I don't seem to get this working.

Please can you help me write a JavaScript function that changes the height of a chart item when I click on it?

I have tried encapsulating my chart item in the span tag and then using document.getElementbyID("myChart").height = "200", but that didn't work.

I have then tried encapsulating the height property of chart item with a span tag and used document.getElementbyID("myHeight").value = "200", but that didn't work either.

How do I plug in to properties of my chart item using JavaScript?

Many thanks,

Agata