DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Web Design

Reply
 
Thread Tools Display Modes
Old 10-22-2014, 12:53 PM   #1
CarlSeiler
Member
 
CarlSeiler's Avatar
 
Join Date: Oct 2005
Location: Denton, TX
Posts: 271
Default What am I missing? Input/Required HTML5

Hi everyone,

According to the caniuse.com site, the required attribute of the input element is supported by just about every browser out there. See:
https://html.spec.whatwg.org/multipa...orm-validation

While I realize that you must you server-side validation for everything received from the user, I'm at a loss as to why required doesn't work in Internet Explorer:
HTML Code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Form</title>
<meta charset="utf-8">

</head>
<body>

<form method="post" action="input-test.html">
    <fieldset>
    <p><label for="search">search
    <input id="search" name="search" type="text" placeholder="Search term" required></label></p>
	
	
	<input type="submit" value="SEARCH" class="submit">
	</fieldset>
  </form>
  
</body>
</html>
I cut out everything else, including js libraries and css, thinking maybe something else was overriding it, but I still can't see this required attribute enforced in IE 11.
CarlSeiler is offline   Reply With Quote
Old 10-22-2014, 01:00 PM   #2
terrie
Staff
 
Join Date: Oct 2004
Posts: 8,944
Default

Don't have a clue but, given what I k now about IE, I don't find it all that surprising that something that works in every other browser doesn't work in IE...

Terrie
terrie is offline   Reply With Quote
Old 10-22-2014, 01:04 PM   #3
CarlSeiler
Member
 
CarlSeiler's Avatar
 
Join Date: Oct 2005
Location: Denton, TX
Posts: 271
Default

Quote:
Originally Posted by terrie View Post
Don't have a clue but, given what I k now about IE, I don't find it all that surprising that something that works in every other browser doesn't work in IE...

Terrie
Heh, well, I knew that going in. I'm just curious that the caniuse site says it works on IE 10 and up, but that is not my experience. I wonder if anyone else finds it to be the same.
CarlSeiler is offline   Reply With Quote
Old 10-22-2014, 02:06 PM   #4
CarlSeiler
Member
 
CarlSeiler's Avatar
 
Join Date: Oct 2005
Location: Denton, TX
Posts: 271
Default

OK, so when I go to http://www.wufoo.com/html5/attributes/09-required.html there's a test and it shows that IE 10+ support the required attribute, and indeed it works on that page. My example in the original post does not work. So I figure it may not be IE at all but my example. But in fact, my example was fine...it was that it seems that it only works when it is being served up via http. If it's loading the local file with file:// protocol designation, IE doesn't seem to perform the validation. The other browsers are fine with validating the local file.
CarlSeiler is offline   Reply With Quote
Old 10-22-2014, 03:29 PM   #5
terrie
Staff
 
Join Date: Oct 2004
Posts: 8,944
Default

Weird about how it handles local file load. That said, it's been eons since I either wrote any html code (any flavor) and/or updated my (poor) website so I'm not more than a basic bozo when it comes to html...'-}}

Terrie
terrie is offline   Reply With Quote
Old 10-23-2014, 01:52 AM   #6
Kelvyn
Staff
 
Kelvyn's Avatar
 
Join Date: Feb 2005
Location: In the Heart of the English Lake District
Posts: 1,381
Default

To properly test local files with IE they should be served from WAMP or similar localhost. I assume it has something to do with the way the IE DOM works (or doesn't).

   
__________________
Kelvyn

Web site design, hosting and marketing, Keswick in the UK Lake District

If you are planning a visit to Keswick then try Keswick Tourist Information website

Kelvyn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Advice: Moving From Flash to HTML5 Ronald Software 3 01-17-2015 11:57 PM
XHTML to HTML5 CarlSeiler Web Site Building & Maintenance 5 12-16-2011 07:41 AM
Neat demonstration of HTML5 Kelvyn Web Design 1 07-21-2010 08:44 AM
CSS input for inline <ul> width dacoyle Web Design 18 01-15-2009 03:29 PM
Anyone have input/ideas wrt Day Rates? curveto Photography 6 11-19-2007 06:24 AM


All times are GMT -8. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.