Jump to content

How to code iFrame for javascript program ?


vmars316

Recommended Posts

Hello & Thanks ,I created a javascript webBrowser Game that uses the following .html :

<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, user-scalable=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><title>Benghazi Game: Lies  and  Cow Pies </title><style type="text/css">body{margin:0;}</style><!-- <script src='http://web-research.appspot.com/files/enchant/enchant.min.js'></script> --><script src="enchant.js"></script><script src="BenghaziGame.js"></script> </head><body></body></html>

But now I would like to put the code into an iFrame so that I can add 'game directions text' to the webPage .Pls, what code would I need to do this ? Thanks...Vernon

Link to comment
Share on other sites

I'm not sure what you want. Here's the syntax for the iframe:http://www.w3schools.com/tags/tag_iframe.asp

<iframe src="file.html"></iframe>

  • Like 1
Link to comment
Share on other sites

Hmm...Yes, this works, Thanks .But now for the *Game.js , the following game control keys dont work anymore (arrowUp, arrowLeft, arrowRight) .So, I have to figure this out next. THanks.
Have you tried using an embed? That way it's still in the page...
Link to comment
Share on other sites

Have you tried using an embed? That way it's still in the page...
Yes, I tried both of these : <embed src="BenghaziGameTest.html" width="640" height="640"> <iframe src="BenghaziGameTest.html" frameborder="0" width="640" height="640"></iframe> But neither one works .I have program running here: http://www.quickerthanaspark.com/BenghaziGame/But without the embed or iframe . Thanks..
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...