peterhanse Posted February 19, 2016 Report Share Posted February 19, 2016 Hello goodmorning.is it possible to make a javascript calculation such as the example below, in the header, in place of the in the footer van een tabular report? . in the footer , he is working correctly.<script> var column_number = 1; var myTable = document.getElementsByName("cbTable")[0]; var myRows = myTable.getElementsByTagName("tr"); var lastRow = myRows.length - 1; var myCells = myRows[lastRow].getElementsByTagName("td"); var myTotal = parseFloat(myCells[column_number].innerHTML); var paard = "voeg uw paard toe!"; var voegtoe = "upgrade uw acount!"; if(myTotal>0) { document.write("<p>Link: " + paard.link("http://google.nl") + "</p>") } else { document.write("<p>Link: " + voegtoe.link("http://caspio") + "</p>") } </script> Regards Peter Quote Link to comment Share on other sites More sharing options...
LWSChad Posted February 19, 2016 Report Share Posted February 19, 2016 When you load a script into the header, is runs before the data loads. So if your script does anything with the data that loads, it must be in the footer. If you want something to appear in the header, you could create an Element in the Header and use JS from the footer to populate that element. Quote Link to comment Share on other sites More sharing options...
peterhanse Posted February 22, 2016 Author Report Share Posted February 22, 2016 Chad, So if you say "Think Easy" , Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.