Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Window.open inside of a div (phonegap)

 
sandip devarkar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So im creating an app with the PhoneGap framework and I have this as my main code
<!DOCTYPE html>
<html>
<head>
<title>Example</title>

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8">

// Wait for device API libraries to load
//
document.addEventListener("deviceready", onDeviceReady, false);

// device APIs are available
//
function onDeviceReady() {
var ref = window.open('TARGET_URL', '_blank', 'location=yes');

}

</script>
</head>
<body>
</body>
</html>
But so what I would like to do is have the website code load into a div in the body so I can use header and footer is coded into the app. As of now it just loads the TARGET_URL full screen and I cant modify it in any way.

Would anyone know how to send the window.open content into a predefined div in the body?
any suggestion for another way.

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic