Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
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 21st, 2005, 08:57 AM
Authorized User
 
Join Date: Jul 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default convert a js file from a asp file - change format

I would like to know how to change the format of this javascript. I want it as a javascript only (a js file), it's not in "ASP format" and I would like the new javascirpt to do everything it can do now. Can someone help me with this?

<script type="text/javascript">
function SelectSize()
{
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].value;
document.body.style.fontSize=SelectedSize + "px";
}
</script>
<form name="frmcontrol">
<select id=size onChange="SelectSize()" >
<option value="20">Default
<option value="12">Very Small
<option value="18">Smaller
<option value="26">Medium
<option value="36">Bigger
<option value="48">Larger
<option value="72">Very Large
</select>
<input type="button" value="Change Size of Text" name="myButton" onClick="SelectSize()" />
</form>

<script language="javascript">

function colorChange()
{
document.bgColor=document.list.colors.options[document.list.colors.selectedIndex].value;
}
</script>
<form name="list">
<select name="colors">
<option value="006633">Default
<option value="black">Black
<option value="white">White
<option value="yellow">Yellow
<option value="red">Red
<option value="blue">Blue
<option value="green">Green
</select>
<input type="button" value="Change Background color" name="myButton2" onClick="colorChange()" />
</form>

<BODY bgColor=#006633>

<script language="javascript">

function change()
{
document.fgColor=document.text.color.options[document.text.color.selectedIndex].value;
}
</script>
<form name="text">
<select name="color">
<option value="black">Default
<option value="black">Black
<option value="white">White
<option value="yellow">Yellow
<option value="red">Red
<option value="blue">Blue
<option value="green">Green
</select>
<input type="button" value="Change Text color" name="myButton3" onClick="change()" />
</form>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Using js file in ASP.NET ndr1977 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 26th, 2006 04:57 AM
Report File Format Convert Problem wscheiman Access VBA 1 January 9th, 2006 11:36 AM
asp file into a javascript file (js)? jstewie Javascript How-To 2 August 25th, 2005 08:32 AM
Is there a component to change file to csv format? greatProject ADO.NET 0 November 11th, 2004 12:20 PM





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