I'm having trouble with jQuery lately.
For instance I'd like to select a text Input and change its value :
var myInput = jQuery('#myInput');
myInput[0].value = "something"; // this works* but text remins grey, and clears as soon as the input gets focus
myInput[0].val("something"); // I believe this is what I should use, however it pops an error :error ²
myVar = $("#something"); // Returns Null (actually, even if I see the function in the debugger that's supposed to return the elements)
*the selector actually is something like : "#aDiv #anOther #anOther #aTable[aDynamicID] tFoot tr[name=[aDymanicName]]"
it works but it's complicated, so I just wrote #something ;)
error ² : Uncaught TypeError: Object # has no method 'val'
Any one understands jQuery enough to see what's going on?? :(
I'm trying to insert filters into a DataTable programatically, here's my <head>
:
<head>
<link rel="stylesheet" type="text/css" href="parminou_style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="jscript/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="jscript/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="jscript/prototype.js" ></script>
<script type="text/javascript" src="jscript/scriptaculous.js" ></script>
<script src="jscript/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script type="text/javascript" src="parminou_js.js" ></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jscript/jquery.dataTables.js"></script>
<script type="text/javascript" src="jscript/jeditable.js"></script>
<script type="text/javascript" src="jscript/jquery-ui-1.8.22.custom.min.js"> </script>
<script type="text/javascript" src="jscript/jquery.ui.datepicker.js"></script>
<!-- src="jquery-1.10.1.min.js" -->
<link href="css/jquery-ui-1.8.22.custom.css" rel="stylesheet" type="text/css" />
<link href="css/jquery.dataTabl
sry, it kinda looks like a mess. :/