Bug Tracker

Opened 14 years ago

Closed 12 years ago

#4083 closed bug (worksforme)

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:


$('#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">


<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> <!-- <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){






} else{

alert('Select some files please');


} ]]> </script>

Why doesn't value expression not work in the current release?

Change History (3)

comment:2 Changed 14 years ago by user52

UPDATE: $('#myform :file[value!=\'\']') selector works with the release of jQuery 1.3.2

comment:3 Changed 12 years ago by dmethvin

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.