jqPlot function call won't work
===

I am basically wondering why this first code works but not the 2nd.

    <a data-role="button" href="#page2" type="button" onClick="drawChart([[["Test1",6],["Test2",5],["Test3",2]]])">
     <img src="icons/page2.png" inline style="height:80px"/><br/>Tilbakemelding
    </a>

The above code does NOT work.

Within page2 I made a button with the following code:

    <div data-role="content">
    <a type="button" onClick=drawChart([[["Test1",6],["Test2",5],["Test3",2]]])>Show Chart</a>
    </div>

This code works, but I would really prefer to have the chart up without having to do that extra click. This is coded in jQueryMobile so the first button does not only load the chart but also navigates to page2.