Thread: Javascript help
-
September 30th, 2011, 01:52 PM #1Junior Member
- Join Date
- Sep 2011
- Posts
- 1
Javascript help
Im am a college student and am having trouble with the asignment and have an ass for a teacher. We need to do a code where when you click the radio button of the corresponding city it will show in the textbox what that citys zip code is. The code looks fine to me but wont display the zip code in the blank. Any suggestions?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="XHTML namespace">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>lesson4b</title>
<script language="Javascript1.2">
<!-- hide from browsers
// Purpose: To find a zip code
// Built by: Josh Sharrer
function getzip(zipfromform)
{
var zipcodedisplay=eval(document.getzip.zipcodedisplay .value)
}
// stop hiding -->
</script>
</head>
<body>
<form id="zip codes" name="zipcode" method="post" action="">
<table width="280" border="1">
<tr>
<td width="92"><p align="right">Pick a town:</p>
<p align="right">
Elko
<input type="radio" name="radio" id="radio" value="radio" onclick=getzip(89801) />
<label for="radio"></label>
</p>
<p align="right">
Eureka
<input type="radio" name="radio" id="radio2" value="radio" onclick=getzip(89316) />
<label for="radio2"></label>
</p>
<p align="right">
Carlin
<input type="radio" name="radio" id="radio3" value="radio" onclick=getzip(89822) />
<label for="radio3"></label>
</p>
<p align="right">
Wells
<input type="radio" name="radio" id="radio4" value="radio" onclick=getzip(89804) />
<label for="radio4"></label>
</p>
<p align="right">
Wendover
<input type="radio" name="radio" id="radio5" value="radio" onclick=getzip(89883) />
<label for="radio5"></label>
</p></td>
<td width="172">Zip Code:
<label for="textfield"></label>
<input type="text" name="zipcodedisplay" id="Zip Code" /></td>
</tr>
</table>
</form>
</body>
</html>
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Javascript Help?
By omccann0991 in forum Webmastering and ProgrammingReplies: 0Last Post: May 7th, 2011, 10:33 AM -
javascript
By faythe in forum Technical SupportReplies: 0Last Post: April 10th, 2009, 02:35 PM -
Can some please help with Javascript?
By RageDNA in forum Webmastering and ProgrammingReplies: 0Last Post: October 23rd, 2003, 11:05 PM -
Javascript Help
By tenor_david in forum Webmastering and ProgrammingReplies: 1Last Post: October 31st, 2002, 01:52 PM -
Javascript help
By raven7647 in forum Webmastering and ProgrammingReplies: 2Last Post: August 6th, 2002, 08:41 PM



LinkBack URL
About LinkBacks



Reply With Quote

that was easy, if only deleting the partition was that simple.
Is It Just Me? v233893843