Page 1 of 1
Internet Explorer Issues
Posted: Fri Oct 28, 2005 11:07 am
by BZorch
Add me to the ranks of those who are frustrated with IE. I love Firefox, but as we all know IE is the dominant browser so we have to deal with it. Besides CSS issues, which I can deal with, I trying to figure out why one of my PHP scripts is not working in IE or Safari.
The index page has a search form and it works just fine in all browsers. In the results page, I am using an .inc header with the same exact search form. All pages are using <DIV>. The header works in Firefox, but the submit button does not work in IE or Safari. I noticed today that even the hot spot links do not even work.
I searched this forum and Google and I have learned even more reasons to dislike IE, but I have not seen this issue.
Has anyone else run into this?
Any insight would appreciated. Thank you.
Posted: Fri Oct 28, 2005 11:09 am
by Chris Corbyn
Given the fact it doesn't work in IE or Safari I doubt it's a standards issue. If you post the code with the form in it we'll have a look.
Posted: Fri Oct 28, 2005 11:45 am
by BZorch
This is the .inc header. Do you need the results.php script? It basically includes the header, performs the search, creates thumbnails and inlcudes a footer with the ob_end_flush().
I just noticed that I do not add the ob_start and ob_end_flush() to the index. Would this be causing the problem?
Code: Select all
<?php # Script header.html
// HTML header for the site.
// Start output buffering and initialize a session.
ob_start();
session_start();
// Check for a $page_title value.
if (!isset($p_title)) {
$page_title = 'mysite';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php echo $p_title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<!-- Wrapper Containing All <DIV>-->
<div id="wrapper">
<!-- header contains menu<DIV>-->
<div id="header_top">
<img src="header_t.gif" border="0" usemap="#Map">
<map name="Map">
<area shape="rect" coords="24,12,162,39" href="beta_index.php">
</map>
</div>
<!-- header contains search menus<DIV>-->
<div id="header_middle_l"
<form action="<?php echo "results.php"; ?>" method="get">
<input class= "form_style1"type="text" name="keyword" size="27" maxlength="50" />
<input class= "form_style1" type="submit" name="search" value="search" />
</form>
</div>
<!-- graphic + place holder for future component<DIV>-->
<div id="header_m_r"
</div>
<!-- graphic + place holder for future component<DIV>-->
<div id="header_b_l">
</div>
<!-- graphic + place holder for future component<DIV>-->
<div id="header_b_r">
</div>
</div>
Posted: Fri Oct 28, 2005 2:25 pm
by BZorch
I also wanted to add that I also noticed the index page (which works ok) does not start sessions.
Thank you.
Posted: Sun Nov 06, 2005 6:59 am
by BZorch
Just in case in the future someone else has the same problem, I realize now it was not a php issue but a simple html issue. For some reason, two of the <DIV> tags were not closed (i.e. <DIV </DIV>). Firefox was completing them while the others did not like it. The difficult part was that everything rendered except the form action.
Posted: Sun Nov 06, 2005 9:26 am
by Charles256
darn,ya beat me to it:) I realized today that if you don't properly close your tags firefox will take care of ya,however I.E. goes slap retarded and you get all kind of weird errors

Posted: Sun Nov 06, 2005 11:03 am
by Roja
Charles256 wrote:darn,ya beat me to it:) I realized today that if you don't properly close your tags firefox will take care of ya,however I.E. goes slap retarded and you get all kind of weird errors

Or of course, you could validate your code to the standards, find the tags that you didnt close, fix them, and they will work on all browsers correctly.
Coding to the standard brings much joy.

Posted: Sun Nov 06, 2005 11:20 am
by Charles256
which is how i figured out i forgot a ">" i wrote </form which is really damn close to right..

Posted: Sun Nov 06, 2005 3:51 pm
by BZorch
I used the following and it did not catch this mistake. Though it exposed a couple others.
validator.w3.org
I will be using it from now on. I am not sure why it did not catch it.