codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  my code giving problem  aman_cingh at 18:50 on Saturday, April 30, 2005
 


function setstyle(stylename)
{
var sheet
for(var loopIndex=0;loopIndex<document.stylesheets.length;loopIndex++)
{
sheet=document.stylesheets[loopIndex]
sheet.disabled=true
if(sheet.id==stylesheets)
{
sheet.disabled=false
}
}
}

<Added>

my code is not wrong i suppose but its not working if any body can help me plz .
<style id = dramatic>
body{font-family:vardana;color:red;background-color:green}
</style>
<style id = normal disabled=true>
body{font-family:times new roman ;color=green;background-color;red}
</style>
i made these to styles which i am using .

<input type="button" value="change color normal" onclick="setstyle('normal')">
<input type="button" value="change color dramatic" onclick="setstyle('dramatic')">

and calling them this way and a text written in body tag but the background nor the text font changes when i click any of these buttons.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  my code giving problem
•  Re: How to kill a MagBox? Please help.
•  help
•  cant view jsp
•  Cant include picture in JButton
•  View State management in User custom control
•  MSMQ with workgroup environment
•  access connection to JSP
•  Please help this n00bie to make a tabbed table work in Netscape 6+


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005