• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

changing label style dynamically

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Im trying to change the label font to bold dynamically.. Im getting a script error though my code serves the purpose. Please have a look at my html. Its realted to JSF , so i dont want to change the id name or add anything new to it..

Please change onklick to onclick.. Javaranch is not allowing me to say onclick



Thanks,
Rajeev.
[ March 09, 2006: Message edited by: Rajeev Ravindran ]
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ,

i put a try/catch in the javascript function and solved the script error but im still curious to know if that is the only workaround.




Thanks,
Rajeev.
 
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just modified your code and it is working for me:
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks KJ..

I tried style.font-weight and fontweight. case-sensitivity killed my time

Thanks Again.
[ March 09, 2006: Message edited by: Rajeev Ravindran ]
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic