Take a look at the .get() function in the API.

 

You need something like this...

 

var tblObj = $("#allProjects").get(0);

 

or, even shorter...

 

var tblObj = $("#allProjects")[0];

 

Basically, when using the $() function, you receive a JQ object.  .get()
returns the actual HTML element, so you can now use JS .insertRows()
function.

 

-ALEX

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Timothy Bowler
Sent: Tuesday, January 09, 2007 10:09 AM
To: [email protected]
Subject: [jQuery] insertrows()

 

I wish to create rows of a table using the DOM.

Using var tblObj = $("#allProjects"); to retrieve the table element i
then want to use the JS insertRow();

This fails, and if i alert tblObj it reports that its an Object object.


However, when using var tblObj = document.getElementById("allProjects");
The alert says that its objectHTMLTableElement.

Therefore how can i use JQuery to return the html tabl element object?


thanx 

-- 
___________________________________________________
Timothy M Bowler BSc(Hons) MSc MIET | Senior Programmer
 
Or Media
Unit 5 Elm Court
156 -170 Bermondsey Street
London
SE1 3TQ
 
T: 020 7939 9540
F: 020 7939 9541
 
___________________________________________________ 
 
 
The information in this e-mail and any attachments is confidential and
is intended solely for the addressee. The material may not be reproduced
either in whole or in part without permission and may not be used or
disclosed without permission. No copies of the entirety or part of the
information set out in this email or any attachment may be made without
our prior approval.  Any views or opinions presented are solely those of
the author and do not necessarily represent those of Or Multimedia
Limited.  If you are not the intended recipient of this email, please
contact us at [EMAIL PROTECTED]
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to