@Jonathan-Silvaons-sliding-menu is part of Onsen UI 1.x. If you are using Onsen UI version 2, you should switch to ons-splitter component since the other one is deprecated in the last versions. In any case, both components have methods (load or setMenuPage) to change their menu pages. Check the reference page of each component (sliding-menu only exists in v1 category).

Apart from that, innerHTML only changes, as its name says, the inner part of the element’s HTML. The element itself remains unmodified. Which means that, in your onOffline function, you are adding an extra sliding menu inside the existing one.

@Fran-Diox , thanks for your explanation.
Yes, my project is using the Onsen UI v1, but it’s possible to change the main-page content by a function on onsen ui framework?
I did it before, into a project-based in cordova 6, and worked well.