Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2005, 12:13 PM
Authorized User
 
Join Date: Jul 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default text increase/decrease ...

How do I make the text increase and decrease with the rest of the page?

<script language="JavaScript">
function SelectSize()
{
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].text;
}
{ document.getElementById().style.fontSize=SelectedS ize; }
}
</script>
</head>

<body>
<form name="frmcontrol">
Change Size of Text<p>
<select id=size onChange="SelectSize()" >
 <option value="8">8px</option>
<option value="9">9px</option>
<option value="10">10px</option>
<option value="12">12px</option>
<option value="15">15px</option>
<option value="20">20px</option>
<option value="25">25px</option>
<option value="72">72px</option>
</select>
</form>

<script language="javascript">

function colorChange()
{
document.bgColor=document.list.colors.options[document.list.colors.selectedIndex].value;
}
</script>

Change Background Color:
<form name="list">
<select name="colors">
<option value="006633">Default
<option value="black">Black
<option value="white">White
</select>
<input type="button" value="Change Background color" name="myButton" onClick="colorChange()" />
</form>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Decrease newsletters nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 December 14th, 2007 11:29 PM
How to Decrease the log file (.ldf) size mike.chary SQL Server 2005 4 September 7th, 2007 07:31 PM
increase DB space... RinoDM SQL Server 2000 5 October 12th, 2006 11:07 PM
How to increase the size of a text feild qazi_nomi Access 1 June 15th, 2004 03:30 AM
How to increase speed manishgore Pro VB Databases 5 March 2nd, 2004 05:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.