OK, so how can i make this link:
"javascript:elements.setPercentage('element1','".$value."')"
execute on my page, when the page is loaded?
OK, so how can i make this link:
"javascript:elements.setPercentage('element1','".$value."')"
execute on my page, when the page is loaded?
you can either put it in the body tag like this:
<body onload="function(){elements.setPercentage('element1','".$value."')}"
or in your javascript file:
window.onload = function(){elements.setPercentage('element1','".$value."')};
Or in jQuery
$(document).ready(function(){elements.setPercentage('element1','".$value."')});
You need to wrap it in a function because you are sending arguments