Side navigation
#4083 closed bug (worksforme)
Opened February 06, 2009 03:30AM UTC
Closed November 14, 2010 02:40PM UTC
selector :file value works in 1.2.6
Reported by: | user52 | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.3.2 |
Component: | selector | Version: | 1.3.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$('#myform :file[value!=\\'\\']') works in 1.2.6; not in 1.3.x
Selector is looking for inputs of type file with value not empty.
Test case where "uncaught exception: Syntax error, unrecognized expression: value!='']":
<div id="myform">
<form action="test-selector.php" enctype="multipart/form-data" method="post">
<div>
<input type="file" name="file" /><br />
<input type="file" name="file" /><br />
<input type="file" name="file" /><br />
<input type="button" value="Send" onclick="submit_form();" />
</div>
</form>
</div>
<!--
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
-->
<script type="text/javascript" src="js/jquery-1.3.1.js"></script>
<script type="text/javascript">
<![CDATA[
function submit_form(){
var files=$('#myform :file[value!=\\'\\']');
if(files.length>0){
files.each(
function(i){
console.log(this);
}
)
}
else{
alert('Select some files please');
}
}
]]>
</script>
Why doesn't value expression not work in the current release?
Attachments (0)
Change History (3)
Changed February 06, 2009 03:39AM UTC by comment:1
Changed February 21, 2009 07:32AM UTC by comment:2
UPDATE: $('#myform :file[value!=\\'\\']') selector works with the release of jQuery 1.3.2
Changed November 14, 2010 02:40PM UTC by comment:3
resolution: | → worksforme |
---|---|
status: | new → closed |
http://darklaunch.com/2009/02/05/jquery-file-selector-works-in-1-2-6