Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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>


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.