Hello
I'm creating a home page that allow users to change it layout. My layout is defined in CSS form i the <head> tag
</head>
then I have a table with forms in it that are supposed to let the user change the font color, style wieght exec.
for exemple:
The user is supposed to choose a font-face and type it in the "bfface" input then press the "Change fontface" button. The changes are supposed to happen in the cell <td class="mintd"> ..</td>
I'm actually very new to javascript and I dunno how to do this.I know it has something to do with some DOM-tree but I have no idea about it.
Can anyone help me, like provide me with a function so I use it a prototype or maybe redirecte me to some good URLs where I can find similar stuff.
The most important thing it that the script has to work on "Firefox browser" ("document.all" does not work with Firefox)
I 'm greatfull in advanced to all people who are willing to help
I'm creating a home page that allow users to change it layout. My layout is defined in CSS form i the <head> tag
Code:
.
.
<head>
<style type="text/css">
td.mintd {font-family:Verdana;
font-weight:normal;
font-size: 12px;
color:rgb( 255 ,255 ,255);
text-align:left;
border-style:solid;
border-width:2px 2px 1px 2px;
border-color:black;
background-color:rgb( 30, 90, 140 );
text-decoration: none;
width:45%
}
</style>
then I have a table with forms in it that are supposed to let the user change the font color, style wieght exec.
Code:
<body>
.
.
<table>
</tr>
<td id="mintd">
.
.
. (here lies things that are supposed to be changed)
.
</td>
<td>
..
Enter a en new Color and press button (ex: while or rgb( 255, 255, 255 ) )
<form >
<input type="button" onclick="somefunction()" value="Change bgcolor"><input type="text" name="bgc">
</form>
Enter a en new Font and press button (ex: Ariel)
<form>
<input type="button" onclick="somefunction()" value="Change fontface"><input type="text" name="bfface">
</form>
..
..
</td>
</tr>
<table>
</body>
The user is supposed to choose a font-face and type it in the "bfface" input then press the "Change fontface" button. The changes are supposed to happen in the cell <td class="mintd"> ..</td>
I'm actually very new to javascript and I dunno how to do this.I know it has something to do with some DOM-tree but I have no idea about it.
Can anyone help me, like provide me with a function so I use it a prototype or maybe redirecte me to some good URLs where I can find similar stuff.
The most important thing it that the script has to work on "Firefox browser" ("document.all" does not work with Firefox)
I 'm greatfull in advanced to all people who are willing to help