NYCPHP Meetup

NYPHP.org

[nycphp-talk] Differing versions of HTML

B.A.S. lists at nopersonal.info
Sun Jan 20 19:20:40 EST 2008


PaulCheung wrote:
> I am testing an "add record" routine and am using three different 
> browsers for the test. The routine is filling in a form and it contains 
> three options EXIT, SUBMIT and CLEAR all three functions are self 
> explanatory and all work as expected in "FIREFOX". In "OPERA" the SUBMIT 
> and CLEAR work as expected; but not the EXIT it submits instead. In MS 
> Internet Explorer  "IE7" it does not work at all, apart from displaying 
> the form, it is like looking at a screen dump.I am unable to fill in the 
> form and the EXIT, SUBMIT and CLEAR are totally not working (locked).
> 
> Could anybody suggest where I could find information that will help me 
> overcome this difficulty or let me know the difference in the HTMLs

Hi Paul,

I'm not 100% sure that I understand the problem you're having, but HTML 
shouldn't affect the functionality or output of your PHP.

If the problem you're having is only with getting all three submit 
buttons to work properly, you might want to look at the discussion 
below, which I found by googling "multiple submit buttons php" (without 
the quotes):

http://www.phpbuilder.com/board/showthread.php?threadid=10248489

If you're having problems with the rendering of the HTML, that may be 
due to differences in the rendering engines of various browsers. Using 
certain doctype definitions can cause browsers to render in "quirks 
mode", which can really throw things out of whack. If you omit the 
doctype declaration (or if it is incomplete or malformed), most browsers 
will render in quirks mode.

For more on quirks mode see:

http://en.wikipedia.org/wiki/Quirks_mode

For doctypes see:

http://htmlhelp.com/tools/validator/doctype.html
http://www.w3.org/QA/2002/04/valid-dtd-list.html

You also need to be sure you're not using deprecated tags for whichever 
doctype you've chosen as that can cause validation errors & other weirdness.

For validation I use the following Firefox Add-on:

https://addons.mozilla.org/en-US/firefox/addon/249 (I use the HTML Tidy 
option)

Last but not least, to find out if your browser if rendering a page in 
quirks or standards mode, paste the line of javascript below into your 
browser's address bar and press "Enter":

javascript:alert(document.compatMode=='BackCompat'?'QuirksMode':'Standards 
Mode');

Bev



More information about the talk mailing list