Page 1 of 2

Hrefs in ie creating a blank page

Posted: Thu Nov 02, 2006 5:41 pm
by freefall
Well, I have the oddest thing happening:

windows 2000 ie 6.02800 sp1
href links open a blank page

windows xp ie 6.029sp 2
href links open np at all

firefox 1.x + 2
href links open np at all

What gives? This is driving me nuts.

Posted: Thu Nov 02, 2006 5:42 pm
by feyd
Example of this mysterious code?

Posted: Thu Nov 02, 2006 5:52 pm
by freefall
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


If it these links that are causing the issues. Filewrapper has an include to a controller which processes the "editpage" or "delpage".

Code: Select all

$con .= "<tr valign='top'><td class='listtitle'>" . $alias . "</td><td width='5px'>&nbsp;</td>";
					$con .= "	<td class='editlistlink'><a href='filewrapper.php?editpage=" . $id ."'><img border='0' src='" .$sub_folder."images/edit.png'></a></td><td width='5px'>&nbsp;</td>";
					$con .= "	<td class='deletelistlink'><a href='filewrapper.php?delpage=" . $id ."'><img border='0' src='" .$sub_folder."images/delete.png'></a></td><td width='5px'>&nbsp;</td>";
					$con .= "	<td class='listdesc'>" . $filepath . "</td><td width='5px'>&nbsp;</td></tr>";

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Nov 02, 2006 7:23 pm
by feyd
Other links of the exact same coding work in the named problematic browser?

Posted: Fri Nov 03, 2006 7:51 am
by freefall
no, other pages that list data with the edit and delete buttons have the same problem. I just asked another friend to test it who has the XP setup I listed (6.029etc) and he has the same problems as the windows 2000 ie 6.028 version. Very odd.

Posted: Fri Nov 03, 2006 8:58 am
by freefall
ps: thanks for updating the code format, first time I've had to post any code here.

Posted: Fri Nov 03, 2006 9:39 am
by freefall
Update:

Found the problem. The wrapper php file had this in it in the header. For some reason this was causing the page not to load until refreshed.

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
(I really hope thats the correct syntax)

Would be great to understand why this causes the problem.

We've just checked our browser encoding and on the XP ie 6.029 the encoding was set to Unicode (utf-8), and the win2000 ie 6.028 was running iso...Anyone able to explain what this means?

Posted: Sun Nov 12, 2006 12:25 am
by freefall
anyone know anything with this?

Posted: Mon Nov 13, 2006 1:12 am
by RobertGonzalez
Have you searched google or MSDN?

Posted: Mon Nov 13, 2006 3:17 am
by freefall
I have but thinking about it again I ddint really search for the right thing. Will try again.

Posted: Tue Nov 14, 2006 5:37 am
by freefall
I found this:

The website i'm building required Cyrillic type, so i encode the pages using UTF-8. The problem that happens is that UTF-8 sends information before the php tags, and therefore before the session_start(); which ultimately renders the session_start(); call ineffective.

The UTF-8 encoding sends a small chunk of information before anything. This is called BOM (byte order marks).

I dont really understand it, but it seems very odd that a character encoding would influence the order in which things happen. Also certain browsers dont have this problem. Its nuts.

Posted: Tue Nov 14, 2006 8:30 am
by feyd
The BOM is two bytes of information that are prepended to the file in which the encoding is saved. If you saved your PHP files in UTF-8 with a BOM, then yes, that will often cause output to start before your script's contents can be parsed fully. In many editors you can tell it to not include the BOM. Alternately, you can use a different editor to remove them manually, or even use PHP to detect them in the files and remove them for you.

Posted: Tue Nov 14, 2006 8:32 am
by freefall
I find this exceptionally strange as I use textpad and have used it for many years. Thanks for the information. Again this class of character encoding really shouldnt impact anything other than character encoding or am I missing something simple.

Posted: Tue Nov 14, 2006 8:39 am
by feyd
If you open the file in binary mode (it's in a drop down in the open dialog box) .. you should see two bytes of 0xFF and 0xFE (they may be in a different order) before your supposedly first character in the file. They are the BOM. TextPad has an option to not include the BOM, if memory serves.

Posted: Tue Nov 14, 2006 8:41 am
by freefall
Thanks for your help, I'll go check that now. I am supposing that it only affects some versions of some browers (at a point release version level) because most of the browsers dont have the problem.

For example, I get the same issue trying to login to the wordpress site. Which made me laugh a little.