473,506 Members | 16,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about CssClass

Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my list,
I want that item to be displayed in bold. All the other items should remain
normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.
Nov 18 '05 #1
6 1236
you could simply do onClick="this.style.fontWeight = 'bold';"

Karl

"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my list, I want that item to be displayed in bold. All the other items should remain normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.

Nov 18 '05 #2
Karl,

we tried this, but we couldn't figure out how we could set it back to normal
when we click on another item in the list.

"Karl" <none> wrote in message news:ua**************@TK2MSFTNGP09.phx.gbl...
you could simply do onClick="this.style.fontWeight = 'bold';"

Karl

"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my

list,
I want that item to be displayed in bold. All the other items should

remain
normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.


Nov 18 '05 #3
We tried this but when we click on another item, the first one remains bold.
What we want is that when we click on another item, the first one returns to
normal.

"Karl" <none> wrote in message news:ua**************@TK2MSFTNGP09.phx.gbl...
you could simply do onClick="this.style.fontWeight = 'bold';"

Karl

"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my

list,
I want that item to be displayed in bold. All the other items should

remain
normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.


Nov 18 '05 #4
We've already put this in our stylesheet, but it doesn't help.
Sorry

"Tim::.." <myatix_at_hotmail.com> wrote in message
news:78**********************************@microsof t.com...
Put the following into your stylesheet! Then you can edit it as much as you like! I hope this help!

A:link
{
color: gray;
text-decoration: none;
}

A:visited
{
text-decoration: none;
color: gray;
}

A:active
{
font-weight: bold;
text-decoration: none;
color: gray;
}

A:hover
{
text-decoration: underline;
color: gray;
}

"Bart Schelkens" wrote:
Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my list, I want that item to be displayed in bold. All the other items should remain normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.

Nov 18 '05 #5
Yes I thought I that, but figured you could figure it out.
I take it it looks something like this:
<ul>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
</ul>
There are millions of ways to do this, but try:
<a href="xxxx" onClick="setBold(this);"....>xxx</a>
function setBold(item){
var ul = item.parentNode.parentNode;
var lis = ul.getElementsByTagName("LI");
for (var i = 0; i < lis.length; ++i){
lis.getElementsByTagName("A")[0].style.fontWeight = 'normal';
}
item.style.fontWeight = 'bold';
}

or you could give them all the same name
<a name="xxx" href="...." onClick="setBold(this);" />

and do
function setBold(item){
var items = document.getElementsByName("xxx");
for (var i = 0; i < items.length; ++i){
items[i].style.fontWeight = 'normal';
}
item.style.fontWeight = 'bold';
}
Karl
"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:ux*************@TK2MSFTNGP10.phx.gbl...
We tried this but when we click on another item, the first one remains bold. What we want is that when we click on another item, the first one returns to normal.

"Karl" <none> wrote in message

news:ua**************@TK2MSFTNGP09.phx.gbl...
you could simply do onClick="this.style.fontWeight = 'bold';"

Karl

"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have the following question.

My website is divided in 3 frames.
In my topFrame I display a list (<UL></UL>)
The items in that list are tabs to navigate through my site.
When the user clicks a tab, the mainFrame displays the correct page.

What I would like to do now is, whenever the user clicks an item in my

list,
I want that item to be displayed in bold. All the other items should

remain
normal.

I've been trying a number of things, but I can't get it done.
Can anyone help me?

Thx.



Nov 18 '05 #6
Karl,
thx for the info.
It works just fine now.

"Karl" <none> wrote in message news:e1*************@TK2MSFTNGP11.phx.gbl...
Yes I thought I that, but figured you could figure it out.
I take it it looks something like this:
<ul>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
<li><a href="xxx">xxx</a></li>
</ul>
There are millions of ways to do this, but try:
<a href="xxxx" onClick="setBold(this);"....>xxx</a>
function setBold(item){
var ul = item.parentNode.parentNode;
var lis = ul.getElementsByTagName("LI");
for (var i = 0; i < lis.length; ++i){
lis.getElementsByTagName("A")[0].style.fontWeight = 'normal';
}
item.style.fontWeight = 'bold';
}

or you could give them all the same name
<a name="xxx" href="...." onClick="setBold(this);" />

and do
function setBold(item){
var items = document.getElementsByName("xxx");
for (var i = 0; i < items.length; ++i){
items[i].style.fontWeight = 'normal';
}
item.style.fontWeight = 'bold';
}
Karl
"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:ux*************@TK2MSFTNGP10.phx.gbl...
We tried this but when we click on another item, the first one remains bold.
What we want is that when we click on another item, the first one returns to
normal.

"Karl" <none> wrote in message

news:ua**************@TK2MSFTNGP09.phx.gbl... you could simply do onClick="this.style.fontWeight = 'bold';"

Karl

"Bart Schelkens" <BS********@hotmail.com> wrote in message
news:e2**************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have the following question.
>
> My website is divided in 3 frames.
> In my topFrame I display a list (<UL></UL>)
> The items in that list are tabs to navigate through my site.
> When the user clicks a tab, the mainFrame displays the correct page.
>
> What I would like to do now is, whenever the user clicks an item in my list,
> I want that item to be displayed in bold. All the other items should
remain
> normal.
>
> I've been trying a number of things, but I can't get it done.
> Can anyone help me?
>
> Thx.
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1534
by: Paul K | last post by:
I'm having a bit of trouble understanding how to get an asp.net page to look and feel like the asp page I have already created. It's a basic login page, which I have attempted to create in the vs...
3
1739
by: DC | last post by:
Dear ASP.Net Experts, In ASP, I can write something like this: <table> <tr> <th align=left>ID</th> <th align=left>Product Name</th> <th align=left>Price</th> </tr> <%
5
3625
by: VB Programmer | last post by:
I have a simple datagrid on a webform. (I'm using VB.NET.) In the page load I get some data, set the .DataSource property of the dg, then do a .DataBind. The columns are automatically created. ...
0
1451
by: Steve Kallal | last post by:
I have a DataGrid with an EditCommandColumn column set to a type of PushButton. I want to set set CssClass on these buttons and cannot without using code-behind code on the ItemDataBound event. The...
4
1483
by: Eric | last post by:
I'm trying to reproduce the following table layout using CSS only and am having some trouble with it. I'd like them to look identical but I'm having trouble sizing the labels properly as it doesnt...
5
4140
by: gane kol | last post by:
Hi I have a set of Yes/No radio buttons with textboxes for each. I need to write a common customvalidation function that checks, if radiobutton "yes" is selected, the value in the corresponding...
1
1628
by: kurt sune | last post by:
I am doing a custom control. It contains a label and a textbox and a button. The class inherits WebControl. Thus the control gets a property CssClass visible in the Properties window. ...
9
4059
by: igotyourdotnet | last post by:
I need to create a print preview page BUT my page I need to print has a grid and in the grid I have 2 or 3 columns that have links I want to hide the columns with the links on my print preview page...
12
1858
by: Martien van Wanrooij | last post by:
I have been using for a while a class to create photo albums. Shortly, an array of photo's is declared, initially they are shown as thumbnails, by clicking on a thumbnail a larger photo is shown...
1
2734
by: Jonathan Wood | last post by:
Greetings, On a GridView control, I want to show alternating colors. But instead of alternating on each row, I want to alternate each group. So several items would be one color and the next...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.