how to add inappbrowser slide screen menu

207 views
Skip to first unread message

Before

unread,
Jul 29, 2016, 3:32:31 AM7/29/16
to phonegap
I need inappbrowser slide menu.No button slide screen and show menu.
How do we do it?

ı look cordova docs 

But I do not think would work for me.



.inAppBrowserWrap {
  background-color: rgba(0,0,0,0.75);
  color: rgba(235,235,235,1.0);
}
.inAppBrowserWrap menu {
  overflow: auto;
  list-style-type: none;
  padding-left: 0;
}
.inAppBrowserWrap menu li {
  font-size: 25px;
  height: 25px;
  float: left;
  margin: 0 10px;
  padding: 3px 10px;
  text-decoration: none;
  color: #ccc;
  display: block;
  background: rgba(30,30,30,0.50);
}
.inAppBrowserWrap menu li.disabled {
    color: #777;
}

Ronald K

unread,
Jul 29, 2016, 11:31:21 AM7/29/16
to phonegap
What is an "inappbrowser slide menu"?

Perhaps you just need to create an HTML document with the desired menu, and open that in the inAppBrowser?


jcesarmobile

unread,
Jul 29, 2016, 2:57:30 PM7/29/16
to phonegap
That code is for firefox OS version of the inAppBrowser

Bay Yazılım

unread,
Jul 29, 2016, 6:07:30 PM7/29/16
to phon...@googlegroups.com
for example, I was link google.
and left in a slide menu can i do it?

2016-07-29 21:57 GMT+03:00 jcesarmobile <jcesar...@gmail.com>:
That code is for firefox OS version of the inAppBrowser

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/0HZ7XU_NQbM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jcesarmobile

unread,
Jul 30, 2016, 5:24:16 AM7/30/16
to phonegap
It's technically possible with executeScript and insertCss methods, but it's not an easy task

Bay Yazılım

unread,
Jul 31, 2016, 4:50:12 PM7/31/16
to phon...@googlegroups.com
thank you answer i'm trying :)

2016-07-30 12:24 GMT+03:00 jcesarmobile <jcesar...@gmail.com>:
It's technically possible with executeScript and insertCss methods, but it's not an easy task

Bay Yazılım

unread,
Aug 4, 2016, 10:13:37 AM8/4/16
to phon...@googlegroups.com
Hello guys i have news.

Working executeJavascript but only html files not websites , what can I do , any ideas ?

Load.js
------------
document.addEventListener("deviceready", onDeviceReady, false);
var iabRef = null;
function iabLoadStart(event) {
}
function iabLoadStop(event) {
}
function iabLoadError(event) {
}
function iabClose(event) {
    navigator.app.exitApp();
    iabRef.removeEventListener('loadstart', iabLoadStart);
    iabRef.removeEventListener('loadstop', iabLoadStop);
    iabRef.removeEventListener('loaderror', iabLoadError);
    iabRef.removeEventListener('exit', iabClose);
}
function onDeviceReady() {
    var target = "_blank";
    var options = "location=no,zoom=no,fullscreen=yes,hidden=no,'toolbar=yes', 'toolbarposition=top'";
    iabRef = window.open('page.html', target, options);
    iabRef.addEventListener('loadstop', function() {
        iabRef.executeScript({
            file: "scripts/execute.js"
        });
    });
    iabRef.addEventListener('loadstart', iabLoadStart);
    //iabRef.addEventListener('loadstop', iabLoadStop);
    iabRef.removeEventListener('loaderror', iabLoadError);
    iabRef.addEventListener('exit', iabClose);
}


execute.js
-----------------
document.body.innerHTML += '<div id="mySidenav" class="sidenav">'
    + ' <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>'
    + ' <a href="#">About</a> <a href="#">Services</a> <a href="#">Clients</a>'
    + ' <a href="#">Contact</a> </div>'
    + '<span style="font-size:30px;cursor:pointer" onclick="openNav()">☰ open</span>';
 
var cssId = 'myCss';  // you could encode the css path itself to generate id..
if (!document.getElementById(cssId)) {
    var head = document.getElementsByTagName('head')[0];
    var link = document.createElement('link');
    link.id = cssId;
    link.rel = 'stylesheet';
    link.type = 'text/css';
    link.href = 'css/Menu.css';
    link.media = 'all';
    head.appendChild(link);
}

function openNav() {
    document.getElementById("mySidenav").style.width = "250px";
    document.getElementById("main").style.marginLeft = "250px";
}
function closeNav() {
    document.getElementById("mySidenav").style.width = "0";
    document.getElementById("main").style.marginLeft = "0";
}



Mobile not working addeventlistener DOMContentLoaded


/document.addEventListener('DOMContentLoaded', function () {
alert("Not working");.
//});



Menu.css
---------------

body {
  font-family: "Lato", sans-serif;
}

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

.sidenav a:hover, .offcanvas a:focus {
  color: #f1f1f1;
}

.closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px !important;
  margin-left: 50px;
}

#main {
  transition: margin-left .5s;
  padding: 16px;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }

  .sidenav a {
    font-size: 18px;
  }
}
​​ 

2016-07-31 23:49 GMT+03:00 Bay Yazılım <bayyaz...@gmail.com>:
thank you answer i'm trying :)
2016-07-30 12:24 GMT+03:00 jcesarmobile <jcesar...@gmail.com>:
It's technically possible with executeScript and insertCss methods, but it's not an easy task

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/0HZ7XU_NQbM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+unsubscribe@googlegroups.com.

Kerri Shotts

unread,
Aug 4, 2016, 2:41:08 PM8/4/16
to phonegap
What do you need DOMContentLoaded for?

On Thursday, August 4, 2016 at 9:13:37 AM UTC-5, Jack wrote:
...

Bay Yazılım

unread,
Aug 5, 2016, 2:25:13 AM8/5/16
to phon...@googlegroups.com
Because first load script and document.body null not working.
I'm don't use DomContentLoaded working but only html files i need web sites executeScript.

--

Hammam Alageed

unread,
Oct 24, 2017, 3:08:31 PM10/24/17
to phonegap
how to add inappbrowser slide screen menu
??
any Solve ??
Reply all
Reply to author
Forward
0 new messages