I want to call a javascript function from an aspx page in visual studios 2012. the function takes 7 values from a datbase, any number of times and makes changes to the css based on these values, and a div tag that changes each instance of the repeater
<asp:Repeater ID="repModules" runat="server">
<ItemTemplate>
<div id="<%#Eval("ModuleID")%>" onload="callFunction()">
//different div tags, which have their
//styles edited by the js function
</div>
<script type="text/javascript">
function callFunction() {
go("M1", "name", "20", "0", "80", "50", "70");
}
</script>
</ItemTemplate>
</asp:Repeater>
the end goal is to have variables from the back, aspx.net.cs page, being called in the function but it is not even working as it is. I have tried to call the function several different ways and in several places, and have been stuck on this for some time now. The js script just looks like this:
function go(Id, name, eworth, eattained, worth, attained, progress) {
//here the variables that are read in are
//assigned to variables defined in the js
}
I'm not very set in my ways and any other way we can access the aspx variables in the javascript would be good too. any input or feedback would be greatly appreciated. Thank you very much for your time.