I think I've determined this is a browser issue, but I wouldn't mind someone taking a look at the code to see if I'm doing things correctly
<?php
$menu_id=filter_input(INPUT_GET, 'q', FILTER_SANITIZE_NUMBER_INT);
if (isset($menu_id)) {
$url = "http://www.mysite.com/json/mobile_menu/".$menu_id;
//load menu items
$string=file_get_contents($url);
$menu_object=json_decode($string);
$m = $menu_object->nodes[0];
//load external links in menu
$lurl = "http://www.mysite.com/json/external_links/".$menu_id;
//load menu items
$lstring=file_get_contents($lurl);
$ext_object=json_decode($lstring);
}
else {
header( 'Location: http://m.mysite.com/' ) ;
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php print($m->menu->Menu_Title); ?></title>
<?php require_once 'includes/header.inc.php'; ?>
</head>
<body>
<div id="nid_menu" data-role="page">
<?php require_once 'includes/header_div.php'; ?>
<div data-role="content">
<h1 class="menu_header"><?php print($m->menu->Menu_Title); ?></h1>
<ul data-role="listview" data-dividertheme="a">
<?php
if (isset($m->menu->Title)) {
foreach($menu_object->nodes as $m) {
if ($m->menu->Type == "mobile_menu") {
echo '<li><a href="./menu.php?q='.$m->menu->Nid.'">'.$m->menu->Title.'</a></li>';
}
else {
echo '<li><a href="./page.php?q='.$m->menu->Nid.'">'.$m->menu->Title.'</a></li>';
}
}
}
?>
<?php if (array_key_exists("nodes",get_object_vars($ext_object))) { ?>
<li data-role="list-divider">Other Resources</li>
<?php
foreach($ext_object->nodes as $e) {
echo '<li>'.$e->link->Link.'</li>';
}}
?>
</ul>
</div>
<?php require_once 'includes/footer.php'; ?>
</div>
</body>
</html>