Solved

Problem between Mac/Windows/Browsers

Posted on 2013-01-22
29
301 Views
Last Modified: 2013-02-09
I have a web site at "chris.mrbreeze.com".

I get different screens depending on the browser.  Today I just found out that if you use an Apple phone, you get something different.  I don't have an Apple, so I can't test it.

Attached are the print screens from Firefox and IE.

In FireFox, the menu bar has spaces between the lines but this doesn't happen in IE.
In IE, the last column for the pictures doesn't have the lines around the column unless there is a picture.

I can't wait to see what happens if I try Chrome!

Thanks
Glenn
Exclusives-FIreFox.doc
Exclusives-IE.doc
0
Comment
Question by:breeze351
  • 15
  • 14
29 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38807762
Please post screenshots as jpg or png, they open immediately in our browsers.  'doc' and other files that require programs such as Word are much more time consuming.  

In addition, your pages have way too many errors to render consistently in different browsers.

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.mrbreeze.com%2Findex.shtml
0
 

Author Comment

by:breeze351
ID: 38811812
0
 

Author Comment

by:breeze351
ID: 38811875
I cleaned up the code except for line 149 when you look at the source in the browser.  Sorry about that, but I have a partner modifying the code as well.

The only error that I still see is telling me that there is a "Stray start tag "Script".  
I've gone through the code several times and every time there is a <script> there is a </script>.

I've attached the print screens as png files.

Glenn
Exclusives-FIreFox.png
0
 

Author Comment

by:breeze351
ID: 38811881
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38811890
Ok, you need to fix a lot of errors before we answer your original question.  Your DOCtype on the first line is not one of the recommended ones http://www.w3.org/QA/2002/04/valid-dtd-list.html   HTML 4.01 Transitional would be a good place to start.  Other DOCTYPEs are pickier about things.

Also, you have a second whole page inside your page starting at line 26 after the <p>.  You can keep that table but the other tags that define a new page need to be removed so they don't cause errors.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38811948
Sorry, I was looking at the wrong page.  The border, spacing, and padding in "Table2" all need to be set to 0 to get rid of the lines.  The difference between IE and Firefox is that they do not render some things exactly the same and you can't change that.

<table id="Table2" bgcolor="#ffffdd" border="1" cellspacing="2" cellpadding="2" width="1120px" style="height: 80px;">

Open in new window


Also, your thumbnails should be reduced to the correct size because they are taking longer than necessary to load at the original size.  File names on the web should not have spaces in them, that can cause problems.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38811963
You need to change your DOCTYPE.  The code in your page does Not conform to HTML5 requirements and that will cause display problems.  DOCTYPE is not just a name, it is a reference to the standards that the browsers use to display the page.  For the code that you have, you should be using the HTML 4.01 Transitional I recommended above.
0
 

Author Comment

by:breeze351
ID: 38815852
1.  It's not my data and pictures.  I've been bitching about the picture size since I started this.  You haven't seen the worst of the images.  Some of them are vertical as opposed to horizontal.  Some of them have 2 images in the same file!  The building on the left of the screen is that image!  So how do you display that when allot of them are horizontal.  Want a job resizing all of this?

2.  I changed the <!DOCTYPE HTML>" to read "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">".  The problem with this is that when you click "Exclusives" using IE, it's showing a hidden button.  This doesn't happen with Firefox or Chrome.
I read your last e-mail and went to the site, but it doesn't describe the actual differences between the syntax.

Dave, I thank you for your help.  I'm really a progammer.  You want me to design a database or set up a system, this I'm more comfortable with.  I got stuck with this job because I'm the only one with any experence with php or web pages.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38816043
1. Glad you recognize the problem with the images.  I only take on things like that when I get to be the absolute dictator...

2. You need to add the rest of the DOCTYPE.  You only added the first part and both are needed and yes it makes a difference.  The second part is the actual file on w3.org that contains the definitions.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

The button is there in the source code, it is not 'hidden' but it may be nested incorrectly.  I'm not sure what it is supposed to do there.

The page has a lot of errors still that may be hurting you.  See what you can fix:  http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fchris.mrbreeze.net%2FExclusives.php
0
 

Author Comment

by:breeze351
ID: 38819951
I changed the "<!Doc... " like you said and it works for all the browsers.  The "hidden button" was so that when you go over the address it turns blue and when you click on it, it goes to the display for the space.

I've tried the "validator" url that you sent me.  My question is, that "validator" is giving me line numbers that I don't see in the code.

Thanks
Glenn
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38819989
It is giving the line numbers for the HTML source that you will see in your browser.  Note that any PHP page (or ASP or any other programming language) only delivers HTML to the browser.  The Validator sees what a browser will see and that's where it gets the line numbers.  You have to look at your View Source to match up the errors with the lines and then see where that is created in your PHP source code.
0
 

Author Comment

by:breeze351
ID: 38828213
Dave:
I'm cleaning up the code but I ran into a problem.
The page is "http://chris.mrbreeze.net/Space_Display.php".

"Valid..." is retuning a message stating that it is "Unable to Determine Parse Mode!".
The top part of the page is the same as "Index.php".

Here's the url
http://validator.w3.org/check?uri=http%3A%2F%2Fchris.mrbreeze.net%2FSpace_Display.php&charset=%28detect+automatically%29&doctype=Inline&group=0"]

I'm not sure what the message means or how to correct it.

Glenn
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38828234
That's because the first thing in the HTML is an error message and there are many errors on that page.  You need to fix those before you can check it in the Validator.  It kind of looks like your database access is failing.
0
 

Author Comment

by:breeze351
ID: 38849472
Dave
I'm trying to fix "Space_Display.php".

This html code works in other pages:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

However it gives me an error in this page.  "Validate" won't get past the first line.  If I bring up the page and look at the source it tells me:

"Almost standards mode doctype. Expected <!DOCTYPE HTML>"

WTF!?!?!

I've cleaned up all the html errors that I could find and I'm stuck on this

Thanks
Glenn
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38849675
As I told you, the first thing on that page is a PHP error.  That needs to be fixed before it will validate.  This is what's there:
<br />
<b>Notice</b>:  Undefined index: Radio in <b>/home/mrbreeze/public_html/chris/Space_Display.php</b> on line <b>24</b><br />

Open in new window

0
 

Author Comment

by:breeze351
ID: 38852674
Dave
Okay, I'm a moron.  I can't find the problem with the code!
I've attached the entire code, can you please help.  I don't see anything wrong with the php at the top of it.
I'm still getting the word "Array" in the display.
Thanks
Glenn
Space-Display.php
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38852796
On line 24, you have $Data = $_POST['Radio'];   For whatever reason, the 'Radio' variable in POST does not exist and you are not providing any method to make it valid.  At the top of my 'action' pages is a lot of code that looks like this to provide a default value that prevents errors like this.

if (!isset($_POST['Radio']))  $Data = ''; else $Data = $_POST['Radio'];

Open in new window


By the way, variable names in PHP are case sensitive.  radio != Radio.
0
 

Author Comment

by:breeze351
ID: 38856425
Dave:
I understand what you're saying, but it doesn't make sense.
If "Radio" is not working, the address and the other information would not be retrieved (including the image).

The data is being passed.  
I've added a display of what is coming from "Radio".  The attached screen print shows it on the top of the page.
Space-Display.png
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38856482
The problem is that loading http://chris.mrbreeze.net/Space_Display.php directly does Not bring a valid 'Radio' value.  You're getting it from the correct previous page.  If I click on the link to go directly there, there is no 'Radio' value.  Same with the validator.  You Must give 'Radio' a usable default value if you want to go directly to that page.  Otherwise it will look like this:
mrbreeze Radio error
0
 

Author Comment

by:breeze351
ID: 38861032
Dave:

You shouldn't be able to load the directly from the url.  This is an error in the code, I can take care of this.

Follow these steps:
1. chris.mrbreeze.net
2. exclusives
3. 1122 Madison

On the top of the page display you will see "Data = NY10460011221001".  This is the ID number of the building.  I added this as a debug.  Without this data from "Exclusives.php", the address, the data and the picture won't be displayed.  So "Space_Display.php" is getting the correct information from "Exclusives.php".

I still can't see why it says "Array" over the picture?

Glenn
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38861124
It says "Array" over the picture basically because you told it to.  Look at your PHP source for the word 'Array' until you find one that is in a text position instead of code.

Still.... You should fix the code that allows the errors on http://chris.mrbreeze.net/Space_Display.php because if this is a public web site, the search engines like Google will end up going there directly.  It would be better to display a blank form than a bunch of error messages which might end up in the Google listings.

It is an axiom of design of almost any kind that the users will Not do it only the way you intend for them to do it.  They will do just about any other way they can find.  Your job is not necessarily to make work when it is done wrong but to make it Not fail when they do it wrong.  At the very least, http://chris.mrbreeze.net/Space_Display.php should show a message telling them to go to another page to get it to work.
0
 

Author Comment

by:breeze351
ID: 38864009
Dave:
I've gone through the code.  The string "Array" doesn't appear anywhere.  I searched matching on case.
 
The word "array" appears on the following lines:

Line 42: $ROW=mysql_fetch_array($Space_File);
Line 250: $row = mysql_fetch_array($Picture_Count);
Line 258: $ROW_PICT=mysql_fetch_array($Picture_Data);
Line 272: $ROW_PICT=mysql_fetch_array($Picture_Data);
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38865121
It is contained in the code that generates this:

<td colspan = "9" bgcolor="#ffffdd">Array<div id = "Body_Labels" align = "top">

Open in new window


You need to look at the "View Source" in your browser to do troubleshooting.  The PHP source is the code that generates the HTML that is seen in the browser.  If you are getting data from multiple sources like databases and files, errors aren't always going to be seen in the PHP source.  The HTML "View Source" is the end product and the 'truth'.  The word Array maybe coming from your database.
0
 

Author Comment

by:breeze351
ID: 38866215
Dave:
I've checked the source in the browser, and the word "Array" is there.  It' not coming from the database because even if you click on a listing with no image, the work "Array" shows up.  Also if you look at the word "Array", the font is wrong.  It looks like "Times_Roman" or another font with serifs.

Since I've been working on this code to fix other things the line numbers that I gave you now are most certainly wrong.  I would be more than happy to send you another copy of the source.  Let me know.

Should I maybe post this to the php page?

Glenn
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38866368
What php page?  It looks like "Times_Roman" because there are no styles applied to the element where it is.  You need to look at what ever generates the content of that <td>.  It has to be there.  Somewhere.
0
 

Author Comment

by:breeze351
ID: 38869208
Dave:
I know it has to be coming from somewhere, but I'll be damned if I can find it.
Attached is the php source.
Space-Display.php
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 38869302
This line is probably doing it.  You are not echoing what you think you are.

echo $ROW_PICT;
0
 

Author Comment

by:breeze351
ID: 38869504
That worked!!  Where the hell did the word "Array" come from?
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 38869655
It's the response from the line before it, $ROW_PICT=mysql_fetch_array($Picture_Data);  Since you didn't identify an individual element like you do in the following lines, it just tells you what 'kind' of data it is.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now