I Usiłuję załączonym pewnym jQuery do wyboru w gridview przy użyciu document.ready:
$(document).ready(function()
{
var chkBox= document.getElementById(gvTimeSheet_ctl01_chkAll1);
//I can alert chkBox.id, element exists
var name = $(input[name='gvTimeSheet$ctl01$chkAll1']);
//Here, when I alert the id, I get a null
var ID = $(#gvTimeSheet_ctl01_chkAll1);
//Here, when I alert the id, I get a null
var withClass = $(.chkAll1Class);
//Here, when I alert the id, I get a null
var withClass2 = $(.Bill1);
//Here, when I alert the id, I get a null
//This line causes the browswer to crash and gives me the following error
//Microsoft JScript runtime error: 'null' is null or not an object
$(#gvTimeSheet_ctl01_chkAll1).click(function()
{
var checked_status = this.checked;
$(input[class=Bill1]).each(function()
{
this.checked = checked_status;
});
});
});*/
Więc, dlaczego są wszelkie próby znalezienia obiekt zerowy w jQuery, ale istnieją w regularnych javascript w obrębie tej samej metody? Co ja tu brakuje. Mam pliki jQuery js przyniósł w tagu skrypt bezpośrednio nad tą metodą. Ja po prostu nie mogę znaleźć żadnych przedmiotów na tej stronie z jQuery. Na innych stronach, mogę.













