Skip to content

Instantly share code, notes, and snippets.

@uwePhillPhelps
Created November 5, 2011 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uwePhillPhelps/1341952 to your computer and use it in GitHub Desktop.
Save uwePhillPhelps/1341952 to your computer and use it in GitHub Desktop.
Satsymph Hermes AppFurnace IFrame example (part2)
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