Write a HTML page containing an HTML form to capture the following properties from the user:
a.Name (text box)
b.Address (text area)
c.Phone (text box)
Write javascript functions
(1)to validate Name to contain only alphabets and of maximum length should be 25 ; Show appropriate messages on failure
(2)to validate Address field to contain maximum length of 200 characters; Show appropriate on failure and focus the â˜Addressâ™ field text area
(3)to validate phone number to contain only numeric data; show appropriate messages on failure
I am in a javascript class and in my assignment I have to take three radio buttons in a group and figure out which one is selected. They all have the same name. This is a sandwhich shop he is having us build. The form name is frmMain. Here is what I have so far.
<h3>Size</h3>
<input type="radio" name="radSize" value="Manly Man($4.99)" />Manly Man($4.99) <input type="radio" name="radSize" value="Girly Man($5.99)" />Girly Man($5.99) <input type="radio" name="radSize" value="Super Girly Man($6.99)" />Super Girly Man($6.99)
<script type="text/javascript">
var Total;
function ComputeTotal()
{
if(document.frmMain.radSize[0].checked == true)
{
Total = 4.99;
}
else if(document.frmMain.radSize[1].checked == true)
{
Total = 5.99;
}
else if(document.frmMain.radSize[2].checked == true)
{
Total = 6.99;
}
else
{
alert("Please Choose a Size");
}
}
O.K. I enabled the javascript by clicking tools and enabling it but it wont work. Like I went to Youtube and it said hi- you have either javascript turned off or something like that. I know we have javascript installed but it s not working. Help?
where could I download javascript tutorial on the computer so i dont have to buy it.I mean- you kno what i mean.so do you know where i can download javascript tutorials?Please reply.
I want to use javascript to redirect my website s users to another site which I am affiliated with.
At present whenever I save the page- it shows error msg. Can you help tell whats wrong? tnks. Script is below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!-- begin javascript redirect for javascript 1.1
window.location.replace("http://www.website.com/?affid=162") ;
// end javascript redirect for javascript 1.1-->
</script>
<script language="javascript">
<!-- begin javascript redirect for javascript 1.0
window.location.href = http://www.website.com/?affid=162;
// end javascript redirect for javascript 1.0-->
</script>
</head>
<body>
One moment please . . . Your page is loading
<meta http-equiv="REFRESH" content="0;url=http://www.website.com/affid=162">
</body>
</html>
No comments:
Post a Comment