By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,025 Members | 622 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,025 IT Pros & Developers. It's quick & easy.

if link visited change font-size dynamically

P: 2
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
  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>
  12.                             </select>

i coded so.but it doesn't work. how can i do it ??
Dec 21 '08 #1
Share this Question
Share on Google+
3 Replies

P: 2
why nobody answer me :(((
Dec 22 '08 #2

Expert Mod 5K+
P: 5,390
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

Expert Mod 5K+
P: 8,639
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

Dec 22 '08 #4

Post your reply

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