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
mary jean ligas
NA
420
196.2k
how to put condition on document.getelementid with css
Apr 19 2013 12:29 AM
how to put condition on document.getelementid with css using single aspx page but different id on my links..i have designed the links on the left corner of my masterpage but the problem is when i declare script for "document.getelementid" and the links are in same url location the selected part on my link was being called also. what i want is when i clicked link 1(id="nonmto") then the font color are highlighted to white and when i clicked a link 2(id="mto") then it will remove the color of my link 1 and the link 2 will change the highlight into white..
here is my snipet:
<div id="Left" class="Left-ContentLive">
<ul>
<li>
<a id="
nonmto
" href="
NewConcession.aspx?id=1
" class="">
<asp:Label runat="server" ID=lblNew Font-Size="8" Font-Italic="true">New</asp:Label>
<br>  CP Traditional Trade<br><br>
</a>
</li>
<li>
<a id="
mto
" href="
NewConcession.aspx?id=2
" class="">
<asp:Label runat="server" ID=Label1 Font-Size="8" Font-Italic="true">New</asp:Label>
<br>  CP Modern Trade<br><br>
</a>
</li>
<li>
<a id="cs" href="NewContract.aspx?id=0" class="">
<asp:Label runat="server" ID=lblNew2 Font-Size="8" Font-Italic="true">New</asp:Label>
<br>  Contract Synopsis
<br /><br /><br /><br />
</a>
<hr />
</li>
<li>
<a id="dwnStd" href="DownloadTemplates.aspx" class="">
<br />
<asp:Label runat="server" ID=lblDownload Font-Size="8" Font-Italic="true">Download</asp:Label>
<br>  Standard Templates<br /><br>
</a>
</li>
<li>
<a id="report" href="ReportList.aspx" class="">
<asp:Label runat="server" ID=Label2 Font-Size="8" Font-Italic="true">Generate</asp:Label>
<br>  Reports<br /><br>
</a>
</li>
<li>
<a id="NewCLMSUser" href="NewUser.aspx" class="">
<asp:Label runat="server" ID=lblNewUser Font-Size="8" Font-Italic="true">New</asp:Label>
<br>  <asp:Label runat="server" ID="lblCLMSUser">CLMS User</asp:Label>
</a>
</li>
</ul>
then on my page:
<script type="text/javascript">
document.getElementById("nonmto").setAttribute("class", "Selected");
document.getElementById("mto").setAttribute("class", "Selected");
</script>
<div>
NewConcession
PAGE
design
</div>
please help me...
Reply
Answers (
0
)
Ajax control toolkit problem
Streamreader into list using split