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
piya p
NA
84
48.1k
How to get selected index from datalist in javascript.
Apr 25 2014 6:19 AM
In my code I am adding following code in javascript and datalist
Javascript:
<script type="text/javascript">
$("[id*=Button1]").live("click", function () {
$("#dialog").dialog({
title: "New Name",
buttons: {
Submit: function () {
var item = name.value;
alert("New Name : " + item);
window.open("Page1.aspx?albumname=" + item);
return false;
}
}
});
return false;
});
</script>
Datalist:
<asp:DataList ID="datalist" RepeatDirection="Horizontal" DataKeyNames="val1" RepeatColumns="6" AlternateText=" " runat="server" Height="102px" Width="229px" CellSpacing="5" >
<ItemTemplate >
<asp:TextBox ID="txt" runat="server" Text='<%# Eval("val1") %>' ReadOnly="true" Enabled="false" />
<asp:Button ID="Button1" runat="server" Text="Edit" Height="30" Width="40" AlternateText=" " >
</asp:Button>
</ItemTemplate>
</asp:DataList>
When I click on edit button in datalist then above javascript popup is coming
What I want is when I click on edit button value of textbox associated with it should be also show in alert.
How to show such a value?
Reply
Answers (
0
)
How to redirect to login after session out?
retrieve images from database