Jignesh Trivedi
posted
636 posts
since
Dec 26, 2011
from
India
|
|
Re: How to get the Listview value in through JavaScript
|
|
|
|
|
|
|
|
|
|
|
hi,
Please try..
<asp:LinkButton id='OutPutIndicatorName' runat='server' OnClientClick='<%#Eval("OutputIndicatorID","javascript:OpenFormula({0});")%>' />
hope this help.
|
|
|
|
|
|
Senthilkumar
posted
1057 posts
since
Jul 28, 2009
from
Bangalore
|
|
Re: How to get the Listview value in through JavaScript
|
|
|
|
|
|
|
|
|
|
|
Hi Anurag,
You can do this in a simple way.
<asp:LinkButton ID="OutPutIndicatorName"runat="server"OnClientClick = 'javascript:OpenFormula(this.id);' Text='<%#(Eval("OutputIndicatorName"))%>'></asp:LinkButton>
In the javascript function you have to write the following.
function OpenFormula(var ctrlID) { if(document.getElementById(ctrlID)) { alert(document.getElementById(ctrlID).innerText); } }
|
|
|
|
|
If this post is useful then mark it as "Accepted Answer"
|
|
|
|
|
|