View Full Version : How to change bground colour in htmlkit using radio button
wiggywoo
11-16-2005, 10:03 AM
How do I change the bground colour in htmlkit using radio button?
do you want to change the bgcolor of the editor or of your html file? ur htmlfile i guess.
what script-langs do u want to use/able to use? we need more useful information ;)
wiggywoo
11-16-2005, 11:24 AM
Only just begun using html and am usimng it along side vbscript.
welshsteve
11-16-2005, 12:20 PM
Try this. This is just a simple drop down box that will change the background colour of a page to the one selected.
Changing Background Colours
<br />
<form>
<select name="color" onChange="document.bgColor=(this.form.color.value)">
<option value="#ffff00">Yellow</option>
<option value="#0000ff">Blue</option>
</select>
</form>
wiggywoo
11-17-2005, 05:51 AM
Hi and thankyou very much that worked a treat! But I need to know how to do it with a radio button!Any ideas?
I also need to know how to allow the user to selected multiple cells and rows in a tablel. Any ideas?
Oooo and I know I'm a real pain but wondered whether you'd tell me exactly whats happening in the bit of code below cos I like to know what is it the html is doing!
Thanks in advance for your help.
=(this.form.color.value)">
welshsteve
11-18-2005, 09:06 AM
That line of code is telling the browser to set the bgcolor of the document (web page) to value of the form element selected. Here's how you do it with a radio button.
Pick a color
<br />
<form>
<input type="radio" onclick="document.bgColor='#ffff00'">Yellow<br />
<input type="radio" onclick="document.bgColor='#0000ff'">Blue<br />
</form>
You can't select multiple cells and rows in a standard html table. At least not in the way I'm thinking you are asking for.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.