Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6717411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:50:54+00:00 2026-05-26T08:50:54+00:00

I load a file called content.php into my browser. Content.php uses jquery to display

  • 0

I load a file called content.php into my browser. Content.php uses jquery to display some tabs for navigating between different types of content. The tabs are set up to load via Ajax.

Here is content.php:

<?php
include_once 'bin/Cookie.inc';
Cookie::check_auth();
$cookie = new Cookie();
?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Client Matters - Home</title>
    <link type="text/css" href="css/pepper-grinder/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> 
    <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript">
        $(function()
        {
                $( "#tabs" ).tabs();
        });
    </script>
    <style type="text/css">
        body{ font: 12pt "Trebuchet MS", sans-serif; margin: 0px;}
    </style>    
</head>
<body>
<div id="tabs">
  <ul>
      <li><a href="clients.php">Clients</a></li>
      <li><a href="matters.php">Matters</a></li>
      <li><a href="contacts.php">Contacts</a></li>
      <li><a href="calendar.php">Calendar</a></li>
      <li><a href="management.php">Admin</a></li>
    <li><a href="test.html">Settings</a></li>
      <li><a href="logout.php">Logout</a></li>
  </ul>
</div>
</body>
</html>

When the user clicks on the “Clients” tab, clients.php is loaded. clients.php in turn makes an ajax query to the server to get the list of clients to display on it’s page.

clients.php looks like this:

<?php
include_once 'bin/Cookie.inc';
Cookie::check_auth();
$cookie = new Cookie();
?>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Client Matters - Home</title>
    <link type="text/css" href="css/pepper-grinder/jquery-ui-1.8.16.custom.css" rel="stylesheet" /> 
    <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript">

        $(function()
        {
        $.ajax(
        {
          url: 'bin/getClientList.php',
          type: 'post',
          cache: false,
          dataType: 'json',
          success: function(data) {handleFormDataPostSuccess(data);},
          error:   function(data) {handleFormDataPostFailure(data);}
        });
  });

  function handleFormDataPostSuccess(contacts)
  {
    $.each(contacts, function(index, contact)
    {
      var cname = "<tr><td>" + contact.lastName + ", " + contact.firstName + " " + contact.middleName + " " + contact.suffix + "</td>";
      var phone1Link = "<td><a href='" + contact.voipDialString.replace("TO", contact.phone1) + "'>" + contact.phone1 + "</a></td>";
      var phone2Link = "<td><a href='" + contact.voipDialString.replace("TO", contact.phone2) + "'>" + contact.phone2 + "</a></td>";
      var emailLink  = "<td><a href='" + "mailto:" + contact.email + "?subject='Your%20Case'" + ">" + contact.email + "</a></td></tr>";
      $('#contactTable tr:last').after(cname + phone1Link + phone2Link + emailLink);
    });

    $('#contactTable tr:odd').addClass("alt");
  }

  function handleFormDataPostFailure(error)
  {
    alert(error);
  }
    </script>
    <style type="text/css">
        body{ font: 12pt "Trebuchet MS", sans-serif; margin: 0px;}
        td{padding:1em 1em 1em 1em; vertical-align:middle}
        tr.alt {background: #D5D1B9}
        table {border-width: 0px;border-spacing: 2px;border-style: none;border-collapse: collapse}
  table th {border-width: 0px;border-style: none}
  table td {border-width: 0px;padding:1em;border-style: none;}
  tr:hover{background-color:yellow}
    </style>    
</head>
<body>
    <table id="contactTable" width="100%">
  <tr>
    <th>Name</th>
    <th>Phone 1</th>
    <th>Phone 2</th>
    <th>Email</th>
  </tr>
</table>
</body>
</html>

This all works perfectly on IE, Firefox, Safari on my PC, and the browser on my Acer A500 Android tablet.

However, the tab/javascript interaction somehow fails when I’m running this on an iPad2 or an iPhone 3G (my only two Apple hardware products).

If I turn off the tabs (e.g. remove the in-line javascript from content.php) and just show a list of links for each segment of content, it looks ugly but works find on the iPad. If leave the tabs on, it looks great, but won’t run the javascript inside clients.php.

Based on “error_log()” lines I’ve put in the PHP part of clients.php, I know the clients.php file is being loaded, but based on “alert()” lines I put in the javascript, none of the java script is running.

I enabled the debug console on the ipad2 and I don’t get any errors. I even put some crazy lines of non-code inside the in-line javascript in clients.php. Firefox’s error console complained out them, but the iPad2’s error console remained empty.

Anyway, I’m just lost in terms of figuring out why this works on my other systems but not on an iPad or iPhone. Any pointers–even clues–will be greatly and deeply appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:50:55+00:00Added an answer on May 26, 2026 at 8:50 am

    Could you try where clients.php dosent contain HTML structure markup.

    The JQUERY-UI example only uses the HTML which needs to be listed inside the tab.
    Which makes me think it loads your complete strcuture into the tab, and then have a body+head tag inside the tab, which is fair enough that IOS/Safari has trouble understadning.

    Could you test it with just something like this:

    <?php
    include_once 'bin/Cookie.inc';
    Cookie::check_auth();
    $cookie = new Cookie();
    ?>
    <script type="text/javascript">
    
            $(function()
            {
            $.ajax(
            {
              url: 'bin/getClientList.php',
              type: 'post',
              cache: false,
              dataType: 'json',
              success: function(data) {handleFormDataPostSuccess(data);},
              error:   function(data) {handleFormDataPostFailure(data);}
            });
      });
    
      function handleFormDataPostSuccess(contacts)
      {
        $.each(contacts, function(index, contact)
        {
          var cname = "<tr><td>" + contact.lastName + ", " + contact.firstName + " " + contact.middleName + " " + contact.suffix + "</td>";
          var phone1Link = "<td><a href='" + contact.voipDialString.replace("TO", contact.phone1) + "'>" + contact.phone1 + "</a></td>";
          var phone2Link = "<td><a href='" + contact.voipDialString.replace("TO", contact.phone2) + "'>" + contact.phone2 + "</a></td>";
          var emailLink  = "<td><a href='" + "mailto:" + contact.email + "?subject='Your%20Case'" + ">" + contact.email + "</a></td></tr>";
          $('#contactTable tr:last').after(cname + phone1Link + phone2Link + emailLink);
        });
    
        $('#contactTable tr:odd').addClass("alt");
      }
    
      function handleFormDataPostFailure(error)
      {
        alert(error);
      }
    </script>
    
    <table id="contactTable" width="100%">
      <tr>
        <th>Name</th>
        <th>Phone 1</th>
        <th>Phone 2</th>
        <th>Email</th>
      </tr>
    </table>
    

    Since it’s executed on your page, it should NOT be necessary to reload script files.

    This soloution could of course be a problem if you access the page outside the tabs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code to load the content from a different page into the
I'm using the code below to load a text file content into a WebView
I have some slow internet task to save and load file, I'd like to
I need to load a file from an umounted TrueCrypt disk into memory. Is
I am trying to figure out an eazy way to load CSV file into
I have an HTML document, which loads content from a PHP file using an
I have this statement in my jQuery file: $.get(homeTemplates/randomVids.php, function(data){$(#hVid).html(data);}); Where the contents of
Using either .ajax or .load, I'm loading content from an .html page into or
I have a php file as given below. The page generates html content which
I'm delving into some AJAX and I'm trying to utilise jQuery. I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.