I want to change style
attribute
of linkbutton
through javascript
the javascript, tried working for DropDownList
but not for linkbutton
.
Here is my code
</asp:ListItem>
<asp:ListItem Text="vikas" Value="0">
</asp:ListItem>
</asp:DropDownList>
<asp:LinkButton ID="lnkbtnSave" Style="display: none" Text="Save" runat="server"></asp:LinkButton>
<asp:LinkButton ID="lnkbtnCancel" Style="display: none" Text="Cancel" runat="server"></asp:LinkButton>
<asp:TextBox ID="lnkbtnTest" Style="display: none" Text="hope" runat="server"></asp:TextBox>
<asp:LinkButton ID="lnkbtnChangeHR" Text="Change Hiring Manager:" runat="server"
OnClientClick="javascript:return Visible(this.id);"></asp:LinkButton>
</div>
<script type="text/javascript" language="javascript">
alert('dil sambhal ja jara');
function Visible(me) {
alert(document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnTest")));
document.getElementById(me.replace("lnkbtnChangeHR", "ddlHiringManager")).style.display = 'inline';
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnSave")).style.display = 'inline';
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnCancel")).style.display = 'inline';
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnChnageHR")).style.display = 'none';
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnSave")).style.color = "#f6f6f6";
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnCancel")).style.color = "#f6f6f6";
document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnTest")).style.display = 'inline';
alert(document.getElementById(me.replace("lnkbtnChnageHR", "lnkbtnCancel")).style.display == 'none');
return false;
}
</script>
Sorry guys it was the PICNIC
it was the lnkbtnChangeHR not lnkbtnChnageHR
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.