SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 23rd, 2006, 07:32 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 3
Send a message via AIM to Geo.Garnett
Submiting a form as an attachment to an email

Scratch that crap I just realized I am being like all those ppl I dont like and submitting questions that are to broad and doing little research before posting. SO, let me define my question a little bit. I'm trying to write a script that will take four variables from a text input field and one drop down box and then writing them below for any number of times until the person submits it. The problem I am having is how do I use the text fields in the java script, do I use the name as the variable or the value? I get a lot of info on the java script on the net but not a lot of the combo html and java working together.
Code:
<script language='javascript'>
var string1 = +id;
var string2 = +type;
var string3 = +mode;
function add()
{
 document.write(+id," "+type+" "mode+);
}
</script>

I got something like that just as a starter but then the html code is
Code:
<input type='text' name='id' >
<input type='text' name='type' >
<input type='text' name='mode' >
<input type='button' value='add' onclick='add()'>

so basically I want to use, user input and then write it below, how do I declare a user defined variable to do this?

Secondly=can someone give me some good links to javascript examples and tutorials. I have an understanding of C/C++ and see that its not much different in some aspects but the id's and crap are throwing me a little.
__________________
---Official Member Of The Itsacon Fan Club---
Give a man a fish and he will eat for a day. Teach a man to fish and he will sit in a boat all day drinking beer.

Last edited by Geo.Garnett : February 23rd, 2006 at 10:16 PM.

Reply With Quote
  #2  
Old February 24th, 2006, 10:22 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 541 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 15 m 6 sec
Reputation Power: 3
javascript and form elements

Ah, the DOM! (document object model) You can get the values of form elements using getElementById
I believe that document.write will create a new document in the window. You may want to look into createElement too. You could google for - DOM tutorial - and get lots of results. Here's one http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=24

Reply With Quote
  #3  
Old February 24th, 2006, 12:26 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 3
Send a message via AIM to Geo.Garnett
Thx for the tip Mittineague that was pretty much what I was looking for. Its not like in C++ were you can declare a variable to use and then use is you gotta give the path to it, which was kinda difficult for me to understand, and Im kinda still puzzled by it just a little. But definately that link explained a great deal.

I have also found another link to another good source of information on this subject just incase anyone else is interested
Link

Last edited by Geo.Garnett : February 26th, 2006 at 06:25 PM.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Submiting a form as an attachment to an email


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway