TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
brian
NA
1
1.2k
retriving data using jquery from a model
Dec 5 2012 4:47 AM
HI
Can anyone advice me on this problem.
i'm creating a tagging system. in my model (model1) it creates a row of documents by calling another model (model2) ive created a jquery script in modal1 which sets the tag(img) on n off in each row of the document. is there a way i can retrieve the document id from the documents using jquery n updating the documents wth the tags.
model 2
<tr class="flag"><td> <img .....></td><td><%: html.DisplayFor(m=>m.id) %></td></tr>
</td>
<% if (!Model.IsLoadViaDialog) { %>
<td>
<%: Html.DisplayFor(m=>m.Owner) %>
</td>
<% } %>
<td>
<%: Html.DisplayFor(m=>m.Date) %>
</td>
model 1
<tbody class="child" style="display: table-row-group;">
<% foreach (var d in Model.Rows)
{ %>
<%: Html.DisplayFor(m => d, new { divId, parentId = Model.ParentId })%>
<% } %>
</tbody>
//in my script its smthing like
<script type="text/javascript">
$('.flag').click(function(){
(this).attr.('src',swap);
function swap(){
//code to alternate image;
return url;
}
});
</script>
Reply
Answers (
0
)
How to remove symbol in textbox?
how to populate dropdownlist value from database value