TechSpott - Computer and technology forums

Go Back   TechSpott - Computer and technology forums > Webmasters > Programming > JavaScript
JavaScript Need help with the (primarily) client-side programming language? This is the place. Includes discussion on AJAX (Asynchronous JavaScript and XML).

Reply
 
Thread Tools Display Modes
Old April 26th, 2010, 08:09 PM   #1 (permalink)
tesfa k
Guest
 
Posts: n/a
Default HTML and Javascript ,?

Im trying to create a form where people will be able to leave their details, comments + a rating. I've figured out how to show a summary for the comments but im stuck with the rating part. How do i go about in showing a summary for all this?
原帖地å€: TechSpott - Computer and technology forums http://www.techspott.com//showthread.php?p=10575



<html>

<head>
<title>Feedback Form</title>
<SCRIPT TYPE="text/javascript">
<!--


function showSummary(frm)
{
if (frm.Name.value == "" || frm.Email.value == "" || frm.Comments.value == "")
alert("Field is incomplet!")
else
alert("Name:"+frm.Name.value + "\nE-mail Address:"+frm.Email.value + "\nYour Message:"+frm.Comments.value)
frm.Name.value = ""
}


//-->
</SCRIPT>
</head>

<body bgcolor="white">
<h3><center>Feedback Form</center></h3>
<form name="form1" >

<fieldset><legend align="left">Please fill in your name and e-mail address below</legend>
</br>

Name:<input name="Name" type="text" size="20" Style="background:#E8E8E8"
tabindex="322" accesskey="n"/>
<br />

E-mail:<input name="Email" type="text" size="40" Style="background:#E8E8E8"
tabindex="3" accesskey="e"/>
</fieldset>
<br /></br></br>


<fieldset><legend align="left">Comments and Rating</legend>
</br>
Please enter your comments here:
</br>

<textarea cols="40" rows="10" name="Comments" STYLE="background:silver"
tabindex="1" accesskey="c">
</textarea>
</br></br></br>How useful did you find this website
</br><input type="radio" name="Rating" value="a"/>Very poor
</br><input type="radio" name="Rating" value="b"/>Not bad
</br><input type="radio" name="Rating" value="c"/>Good
</br><input type="radio" name="Rating" value="d"/>Awesome
</fieldset>

<input type="reset" value="Reset" accesskey="r"/>
<input type="submit" name="button" value="Submit" onClick="showSummary(this.form)"
accesskey="s"/>
</form>
</body>
</html>
  Reply With Quote Share with Facebook
Reply

Bookmarks

Tags
html, javascript


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Posting Comments in HTML or JavaScript? Ghosty JavaScript 0 April 21st, 2010 09:33 PM
Helpful JavaScript for Web DEV JavaScriptBank JavaScript 0 April 15th, 2010 01:05 PM
How to enter data in javascript html? Mariel Emilene JavaScript 0 April 8th, 2010 02:50 AM
How can I use this HTML form, to create a Timetable in Javascript? iliketurtles JavaScript 0 April 6th, 2010 06:54 AM
How to make javascript open up in html? Daniel JavaScript 1 April 4th, 2010 03:26 AM

 
Forum Stats
Members: 14,320
Threads: 20,326
Posts: 27,666
Total Online: 42

Newest Member: VanoNat

Latest Threads

Advertisements

Support our advertisers!

Amazon
Sears
Macys
1800flowers.com
Drugstore.com


Carbonite Online-Backups
Tiger Direct
Tech Depot
Buy.com
Office Depot
Fatcow
HostGator


TripsNow.us
Marriott
Expedia
CheapTickets.com
OneTravel
Hotwire

Are you a Fan?

Share this on Facebook

Tag Cloud

Partner Links


Contact Us - Home - Archive - Privacy Statement - Top - Copyright © 2009-2010, TechSpott - All times are GMT -4. Time is 04:52 AM

Powered by vBulletin® Copyright © Jelsoft Enterprises Ltd. :: SEO by vBSEO