aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes jquery alert query out should be 3 elements but its telling 4 elements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jquery alert query out should be 3 elements but its telling 4 elements" Watch "jquery alert query out should be 3 elements but its telling 4 elements" New topic
Author

jquery alert query out should be 3 elements but its telling 4 elements

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050



http://www.lifesbizzare.blogspot.com || OCJP:81%
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Please properly indent your code when posting. Unindented code is very hard to read.

Open the JavaScript debugger in your browser and look at the DOM that's created from your HTML. (Not View Source -- look at the real DOM)

You will see that 4 is the correct value.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

P.S. You should also be using a more up-to-date version of jQuery at this point.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

I just Observed in firebug extra <tbody> tag is automatically being created???

How is that possible
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Them's the rules. If you place a <tr> element outside of a <thead>, <tbody>, or <tfoot>, it will automatically be placed inside a <tbody>.

If you want that row to be in a <thead>, you'll need to do so explicitly.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1050

Bear Bibeault wrote:Them's the rules. If you place a <tr> element outside of a <thead>, <tbody>, or <tfoot>, it will automatically be placed inside a <tbody>.

If you want that row to be in a <thead>, you'll need to do so explicitly.


Thank you Bear, that resolved the issue.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jquery alert query out should be 3 elements but its telling 4 elements
 
Similar Threads
jQuery doubt with reference to Object Literal Example.
jquery script not executing on the data values that are extracted from the database
validation messages not displaying the error messages in the HTML boxes
how to add new row with choosen plugin
How to alert a value in <td> element tag ?