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

  • Home
  • SEARCH
  • 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 7693989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:12:58+00:00 2026-05-31T21:12:58+00:00

I have a PHP based application that I need to work on both a

  • 0

I have a PHP based application that I need to work on both a normal PC and on a Samsung Galaxy tablet.

The functionality on both devices works correctly however it is just the formatting and presentation of the data that is diffrent.

My Application pulls data from a mysql database when the user enters a product number. this data is displayed in the same row as the product code inserted by the user. in Internet explorer it works 100% however on the tablet, once the user inputs a user code, the entire row is condensed into the first cell.

I have attached images to try get across what the issue is, please find these at bottom of qustion.

My relevent code is:

In Header:

<script type="text/javascript"> 
  function showUser(userNumber, str) 
  { 
  document.getElementById("r"+(userNumber+1)).style.display="block";  
    if (str=="") 
    { 
      document.getElementById("txtHint" + userNumber).innerHTML=""; 
      return; 
    }   
    if (window.XMLHttpRequest) 
    {// code for IE7+, Firefox, Chrome, Opera, Safari 
      xmlhttp=new XMLHttpRequest(); 
    } 
    else 
    {// code for IE6, IE5 
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    } 

    xmlhttp.onreadystatechange=function() 
    { 
      if (xmlhttp.readyState==4 && xmlhttp.status==200) 
      { 
        document.getElementById("txtHint" + userNumber).innerHTML=xmlhttp.responseText; 
      } 
    } 
    xmlhttp.open("GET","getdata1.php?q="+str,true); 
    xmlhttp.send(); 
  } 
</script> 

In Body:

<table><tr id="r1">  
    <td>
<input size=8 style="border: none"  type=number id=sku1 name=sku1 onchange="showUser(1, this.value)" onkeypress="return enter(document.orderform.sku2)" value=<? echo $sku1; ?>  >
    </td>
    <td>
        <? if($grp1==0){echo "&nbsp; ".$grp1;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <? if($su1==0){echo "&nbsp; ".$su1;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <? if($fp1>0){echo "&nbsp; ".$fp1;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <input type=number id=qty1 name=qty1 size=3 value=<? if($qty1>0){echo $qty1;}; ?> >
    </td>
    <td>
        <? if($qty1==0){echo "&nbsp;";} else {if($qty1>0){if($line1decvalue==0){ echo "<img src=tick.jpg>";} else{ echo "<img src=cross.jpg>";}} else {echo "<img src=cross.jpg>";}} ?>
    </td>
    <td>
        <b><font color=red><? if($sku1>0){if($points1>0){echo "&nbsp; ".$points1;} else {echo "0";};} else {echo " &nbsp; ";} ?></font></b>
    </td>
    <td>
        <div align="left" id="txtHint1"><? if($sku1>0){echo "Selling Units: <font color=red>$su1</font>, Grouping: <font color=red>$grp1</font>, $su1 per Pallet: <font color=red>$fp1</font>";} else {echo "Select a SKU on left and Details will be seen here";} ?></div>
    </td>
</tr>
<tr id="r2">  
    <td>
<input size=8  style="border: none" type=number id=sku2 name=sku2 onchange="showUser(2, this.value)" onkeypress="return enter(document.orderform.sku3)" value=<? echo $sku2; ?>   >
    </td>
    <td>
        <? if($grp2==0){echo "&nbsp; ".$grp2;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <? if($su2==0){echo "&nbsp; ".$su2;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <? if($fp2>0){echo "&nbsp; ".$fp2;} else {echo "&nbsp; " ;} ?>
    </td>
    <td>
        <input type=number id=qty2 name=qty2 size=3 value=<? if($qty2>0){echo $qty2;}; ?> >
    </td>
    <td>
        <? if($qty2==0){echo "&nbsp;";} else {if($qty2>0){if($line2decvalue==0){ echo "<img src=tick.jpg>";} else{ echo "<img src=cross.jpg>";}} else {echo "<img src=cross.jpg>";}} ?>
    </td>
    <td>
        <b><font color=red><? if($sku2>0){if($points2>0){echo "&nbsp; ".$points2;} else {echo "0";};} else {echo " &nbsp; ";} ?></font></b>
    </td>
    <td>
        <div align="left" id="txtHint2"><? if($sku2>0){echo "Selling Units: <font color=red>$su2</font>, Grouping: <font color=red>$grp2</font>, $su1 per Pallet: <font color=red>$fp2</font>";} else {echo " &nbsp; "; }?></div>
    </td>
</tr>

PC Functionality:
enter image description here
enter image description here

Tablet Functionality:
enter image description here

Please let me know if I can assist further with any other information.

  • 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-31T21:12:59+00:00Added an answer on May 31, 2026 at 9:12 pm

    here is the answer, the line
    document.getElementById(“r”+(userNumber)).style.display=”block”;
    just needs to be removed. Thanks to @Alex van Oostenrijk for this.

    Regards,
    Ryan

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

Sidebar

Related Questions

I have an application that stores data in database. I need search functionality to
I have a complex input form within a PHP based web application. To structure
I have a PHP script that creates other PHP files based on user input.
I am creating a very large PHP MVC-based site that will have a large
I'd like to have a page in php that normally displays information based on
We currently have an iframe-based Facebook canvas application in the works. The canvas portion
We have a web application that has been built using MySQL / PHP /
I have a wordpress based php application running on apache on ubuntu server. I
We have an a PHP application that we are converting to MVC. The goal
I'm planning to develop a tablet based web application that is compatible on all

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.