Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi group members,

From last few days I have been working very hard on already existed project.Which is done using jquery with SharePoint.How ever I am able to get the result though i am new to jquery.I have a task of getting values from a list and I have almost done the code to get the list item value from the list using jquery.But the end i am not able to get the value of list item.Below is the code,In the alert message instead of value of A I am getting alert message as "Undefined"

var i=$(this).attr('A');
alert(i);


Can any one help me is the below line correct to get the list item value
Posted
Updated 22-Oct-11 2:00am
v2

This has nothing to do with list items or sharepoint. Visit http://query.com[^] and you will find plenty of examples
 
Share this answer
 
v2
Comments
SAM_India 22-Oct-11 8:27am    
Hi Mark,
I have done 2 tasks .one getting total count items existed in the list using jquery ,And other saving list items using jquery.But both the times you have given reply as "Nothing to do with jquery",I don't know y u reply me as nothing to do it.I am working on existing project which is done in jquery.And my client is technically sound ,And i can't go against to my client.I am new to jquery and working hard to find solutions.Hope you try and provide me solution if possible,But thanks for responding with patiently
[no name] 22-Oct-11 8:53am    
When using JavaScript and working with SharePoint lists and list items you are using the Client Object Model. That has nothing to do whatsoever with JQuery or any other JavaScript library. You would use JQuery as you in any other ASP.NET or web application to manipulate the dom within the client browser. That has nothing to do with SharePoint.

What you appear to be using is a JQuery extension that someone has created that uses the SharePoint web services. These again are two separate things. JQuery and SharePoint Web Services. They can each be used independent of each other. And, as I have told you before you should be using the Client OM not the Web Services.

The snippet you posted has NOTHING to do with SharePoint. It could easily have come from any HTML page.

Learn to use the correct tools and terms. That will help to avoid any confusion when asking a question.

Now, what are you having difficulty with Client OM or JQuery?
SAM_India 24-Oct-11 1:45am    
Hi Mark,
If you don't want to give any guidance or help .You Can stay away from my posts.
[no name] 24-Oct-11 7:01am    
I have provided you with a link to an article explaining the process and giving examples. I have also advised you on your confusion with the technologies involved and discribed the differences. If you are unwilling to follow this advise, or unable to understand it, then don't get upset with me.
as mark said before , you can deal with sharepoint by using ECMA-Scripts
(if you want to get data in client side)

if you are , try to look at this link :
http://www.learningsharepoint.com/2011/05/16/get-all-list-items-using-ecmascript-sharepoint-2010/[^]

or you can get data in server side by object model
using Classes like : SPContext , SPSite, SPWeb ,SPList ,SPListItemCollection
,SPListItem and so on.

try one of these solution , and it will be done succefully.

if you want to share your task in a little bit of details , i can help

you get the best solution.

do not hesitate to ask a question , do not worry.
 
Share this answer
 
Comments
[no name] 22-Oct-11 12:58pm    
The OP has already been provided, twice now, with this http://www.codeproject.com/KB/sharepoint/CSOM_Part1.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900