在flexpaper中,我想使用其API使用右键和左键显示下一页和上一页

I am using this to button using onclick

<input type="submit" value="Invoke" onclick="getDocViewer().nextPage()">
<input type="submit" value="Invoke" onclick="getDocViewer().prevPage()">

but it throw error 'Cannot call method 'getApi' of undefined'

how do I fix this ?

<input type=submit value="Invoke" 
       onclick="$FlexPaper('id_of_the_documentViewer_element').nextPage()">
<input type=submit value="Invoke" 
       onclick="$FlexPaper('id_of_the_documentViewer_element').prevPage()">