Created
November 5, 2011 20:06
-
-
Save uwePhillPhelps/1341952 to your computer and use it in GitHub Desktop.
Satsymph Hermes AppFurnace IFrame example (part2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rejigTheFrame() | |
{ | |
/* | |
The AppFurnace environment behaves differently in the three | |
scenarios. i.e. web simulator draft, published, and on iPhone | |
*/ | |
// uncomment these as appropriate | |
var testEnvironment = null; | |
testEnvironment = 'iPhone'; | |
//testEnvironment = 'draftSim'; | |
//testEnvironment = 'publishedSim'; | |
// set your PIRL id here | |
var pirlID = -1; | |
// set your google map API url here | |
var baseURL = 'http://your.domain/'; | |
var mapHtmlName = 'your_mapAPI.html' | |
// do not change below this line | |
// ////////////////////////////////////////////////////////////// | |
var frameURL = null; | |
if ( testEnvironment === 'iPhone' ) | |
{ | |
frameURL = baseURL + mapHtmlName; | |
} | |
else if ( testEnvironment === 'draftSim' ) | |
{ | |
frameURL = 'http://tools.calvium.com/pirlfarm/creation/pirls/' | |
+ pirlID | |
+ '/files/main/media/images/' | |
+ mapHtmlName; | |
} | |
else if ( testEnvironment === 'publishedSim' ) | |
{ | |
frameURL = 'http://tools.calvium.com/pirls/' | |
+ pirlID | |
+ '/main/media/images/' | |
+ mapHtmlName; | |
} | |
var frameInnerHTML = | |
'<iframe ' | |
+ 'id="calMyIFrameSubframe" ' | |
+ 'name="calMyIFrameSubframe" ' | |
+ 'style="width: 100%; height: 100%; " ' | |
+ 'src="' + frameURL + '" ' | |
+ '></iframe>'; | |
document.getElementById('calMyIFrame').innerHTML = frameInnerHTML; | |
/* | |
Clicking the "google" logo in the map object will take over | |
the entire AppFurnace interface. | |
We could block clicks by adding an AppFurnace Container | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment