I have a problem about executing javascript from vaadin 6.8.13. Also i’m not very experienced with javascript so i don’t know how to debug this problem. So if you can help me at least with one of two sides - that will be great.
Details:
I have a class which extends ApplicationServlet and override method:
@Override
protected void writeAjaxPageHtmlVaadinScripts(Window window, String themeName, Application application, BufferedWriter page, String appUrl,
String themeUri, String appId, HttpServletRequest request) throws ServletException, IOException
{
page.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge, chrome=1\"/>\n");
page.write("<script type=\"text/javascript\">\n");
page.write("//<![CDATA[\n");
page.write("document.write(\"<script language='javascript' src='../VAADIN/jquery/jquery-1.4.4.min.js'><\\/script>\");\n");
page.write("document.write(\"<script language='javascript' src='../VAADIN/js/highcharts.js'><\\/script>\");\n");
page.write("document.write(\"<script language='javascript' src='../VAADIN/js/modules/exporting.js'><\\/script>\");\n");
page.write("document.write(\"<script language='javascript' src='../VAADIN/js/graphDefinition.js'><\\/script>\");\n");
page.write("//]]>\n</script>\n");
super.writeAjaxPageHtmlVaadinScripts(window, themeName, application, page, appUrl, themeUri, appId, request);
}
I’m trying to run function -
[code]
doBuildDetailedGraph(containerName, chartTitle, statesData,
containerHeight)
[/code]
Which is part of graphDefinition.js
I use executeJavascript()
function to execute javacript function.
But js function doesn’t start. In the first lines of doBuildDetailedGraph i put line:
console.log(“function starts”)
But firebug doesn’t show any console message (console tab, then all tab)
Also in the
script
tab of firebug i see lines:
<script type="text/javascript">
//<![CDATA[
document.write("<script language='javascript' src='../VAADIN/jquery/jquery-1.4.4.min.js'><\/script>");
document.write("<script language='javascript' src='../VAADIN/js/highcharts.js'><\/script>");
document.write("<script language='javascript' src='../VAADIN/js/modules/exporting.js'><\/script>");
document.write("<script language='javascript' src='../VAADIN/js/graphDefinition.js'><\/script>");
//]]>
</script>
So it is kind of working but it doesn’t.
I don’t know how to debug the problem. Please help me