Re: 'Require' and 'Select' lists

From: Date: Fri, 13 May 2005 14:51:53 +0000
Subject: Re: 'Require' and 'Select' lists
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-215140@lists.php.net to get a copy of this message
Sounds like it might be a browser behavior issue. I've seen some really weird behavior in browsers when a DOCTYPE is not declared at the start of the web page. The doctype declaration and the version declared in it are actually very important to the rendering and behavior of a web page. Over the years, browser behavior has changed and will render code and perform actions differently. The doctype declaration allows specify which version behavior you are targeting. So, is the first line of your web page something like: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
On May 13, 2005, at 8:59 AM, Andre Dubuc wrote:
Thanks for the info, Richard. The errant behavior is intermittent and hard to replicate, but it has forced me to recode this part completly. [This code was my first attempt at PHP two years ago, and it's a bad mix of html/php - I certainly wouldn't do it that way again.] I've replaced the 'In USA/Canada' with 'In USA or Canada' eliminating the possibility of the slash causing problems. However, the behavior continues intermittently. I've duplicated it one time. If I click on the 'State' dropdown list, allow the mouse to scan through it, but do not choose a value, and then immediately go to the previous or next field and click on it, the box where 'USA or Canada' appears will be blank (despite '<option selected value="In USA or Canada">In USA or Canada</option>'). For the life of me, I cannot figure why it's doing that. As a hack, I've included a new routine checking for blank or null value for $selstate that snags problems before they hit the database. However, I'd rather know why this is happening. Logging it - $_POST['selstate'] is blank (after it messes up as above) -- no surprise, since that is what the browser displays. Any other ideas? Regards, Andre -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#215140) next »