473,513 Members | 2,319 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

if link visited change font-size dynamically

2 New Member
Hi,
i design a dynamic web page.infact it will be a css generator.
i have a question about visited link.
i want to change color,font-size,font-weight etc. of a link when it is visited.
when a user change font-size dynamically visited link's font-size will be change.
i use dropdown list for font-size values .
there are 24 links on the page.links id="a1" a2,a3, so on..
Expand|Select|Wrap|Line Numbers
  1. function denemelink(){
  2. var ahtip=document.getElementById('ahfsize').options[document.getElementById('ahfsize').selectedIndex].value;
  3. for(var i=1;i<25;i++) 
  4. {var nesne="a"+i;
  5. var link=document.getElementById(nesne);
  6.  if(link.onmouseover==true){
  7.  document.getElementById(nesne).style.fontSize=ahtip;
  8.  break;
  9. }
  10. }
Expand|Select|Wrap|Line Numbers
  1.  
  2.   <select id="ahfsize" style="width: 82px" onchange="denemelink();">
  3.                                 <option selected="selected"></option>
  4.                                     <option value="XX-Small">XX-Small</option>
  5.                                  <option value="X-Small">X-Small</option>
  6.                                  <option value="Small">Small</option>
  7.                                  <option value="Medium">Medium</option>
  8.                                  <option value="Large">Large</option>
  9.                                  <option value="X-Large">X-Large</option>
  10.                                  <option value="XX-Large">XX-Large</option>
  11.  
  12.                             </select>
  13.  

i coded so.but it doesn't work. how can i do it ??
Dec 21 '08 #1
3 3828
reyo
2 New Member
why nobody answer me :(((
Dec 22 '08 #2
gits
5,390 Recognized Expert Moderator Expert
so you just want to set the font-size for 'visited' links? so the ones that a user already clicked on?
Dec 22 '08 #3
Dormilich
8,658 Recognized Expert Moderator Expert
maybe the problem wasn't clear...

we can answer much better if you describe
1. Any error messages you are getting including the code that the message references
2. What the code should do
3. What the code does not do that it should do
4. What the code does do that is should not do

one obstacle I see is line 6: element.onmouseover is usually not a boolean, see MDC – onmouseover

regards
Dec 22 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
17068
by: Matt Adams | last post by:
As well known I could specify the text color in the body tag like: <BODY TEXT=WHITE LINK=WHITE VLINK=RED ALINK=WHITE> What I want to achieve now is that always (!) the text of the last visited...
36
3832
by: Peter Brause | last post by:
Hello, my stylesheet shows different colors for visited, active and hovered links. It works fine in IE 6, but in Opera 7 the color for the active link (red background) is never shown. How to...
6
15878
by: Carla | last post by:
hi people, I have a little problem that I can't solve with css and i was wondering if you could help me. I have 4 links, I want that when I click/mouseover in the link 1, it turns to a color...
4
1661
by: kevinm3574 | last post by:
I've got a link defined in my html as href="abc123.html" in a <div id="abc123"> block. The link text displays just fine but the link won't show as an available link. If I change the <div id from...
6
3761
by: JimO | last post by:
Is there any way to reset a link's state. In other words reset a visited link to an unvisited link. I guess the question I'm asking would be how do you programatically search and clear the...
9
4154
by: Richard | last post by:
Please hlep with a very frustrating problem. I need to be able to have a reference to my "btcopyrights" CSS class override the link colors first specified earlier in the CSS. I inherited a large...
11
11509
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
28
2633
by: RAB | last post by:
When my user closes the browser, I want the visited link to change to a "fresh" never been visited link once the user (on the same machine) reopens their browser. Here is the code I am using: ...
4
2115
by: ben.dixon | last post by:
Hi, I'm using links for navigation on a test page, so each link will go to a question in the test e.g. Question 1, Question 2 etc. For each link i am using an Outer Border, Middle border and...
1
4080
beacon
by: beacon | last post by:
I'm looking to reset the visited link color once another link is selected. Also, once that link takes me to a particular page, I want the font-weight for that page to be bold to indicate that it's...
0
7177
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
7559
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
7123
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
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4756
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
1611
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 ...
0
470
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.