Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2010
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not sure if this is html or javascript

    Okay so I want to make a form for people to fill out with their name and some more info, the main part that I would be stuck on is I want to add a check box list and each box they check I want a number to pop up at the bottom of the form. If they check boxes 1, 3, and 4 I want the total value to add up at the bottom of the form. I want the form emailed to me. I haven't had much experience in javascript but I noticed when I was reviewing it today it showed adding values x + y, and I don't know if you can make forms in javascript. I know you can make forms in html, but can you add values like javascript using html?

  • #2
    Regular Coder MrEnder's Avatar
    Join Date
    Jul 2008
    Location
    Canada Ontario
    Posts
    258
    Thanks
    18
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by AlCapwn View Post
    Okay so I want to make a form for people to fill out with their name and some more info, the main part that I would be stuck on is I want to add a check box list and each box they check I want a number to pop up at the bottom of the form. If they check boxes 1, 3, and 4 I want the total value to add up at the bottom of the form. I want the form emailed to me. I haven't had much experience in javascript but I noticed when I was reviewing it today it showed adding values x + y, and I don't know if you can make forms in javascript. I know you can make forms in html, but can you add values like javascript using html?
    HTML is only a foundation. Its a bunch of containers no more. You can't make these containers do anything fancy on their own. (except for marquee). Also forms are best done (when a new programmer) in PHP and HTML.

  • #3
    New Coder
    Join Date
    Mar 2010
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts
    So can you not use javascript to create forms that would be emailed to you? Or can you use javascript and html in the same coding?

  • #4
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,134
    Thanks
    12
    Thanked 332 Times in 328 Posts
    Quote Originally Posted by AlCapwn View Post
    So can you not use javascript to create forms that would be emailed to you?
    letís put it this way, JavaScript can be disabled and it canít send you emails

    Quote Originally Posted by AlCapwn View Post
    Or can you use javascript and html in the same coding?
    sure, but thatís rather kludgy.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    Andrť Behrens, NY Times Software Developer

  • #5
    Regular Coder MrEnder's Avatar
    Join Date
    Jul 2008
    Location
    Canada Ontario
    Posts
    258
    Thanks
    18
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by AlCapwn View Post
    So can you not use javascript to create forms that would be emailed to you? Or can you use javascript and html in the same coding?
    Javascript is client side. It can't access any type of files or anything. It can't send information to other files or off the page it is currently on.

    PHP can do all that however. So if you wanted to do any of that you would use PHP. PHP is quite easy to learn.

    And JS can't work without html.

    all web sites use HTML.

    btw (since ive seen this confusion before) HTML does not stand for Hotmail
    HTML stands for Hyper Text Markup Language

    This is html
    Code:
    <html>
    <head>
    
    </title>PAGE TITLE</title>
    
    </head>
    <body>
    
    Hello World
    
    </body>
    </html>

    This is Javascript notice it works INSIDE of HTML
    Code:
    <html>
    <head>
    
    <title>PAGE TITLE</title>
    </head>
    <body>
    
    <script type="text/javascript">
    
    document.write("Hello World");
    
    </script>
    
    </body>
    </html>
    Both codes do the exact same thing

    Take note that the JS is PART of the HTML but is NOT HTML.
    So no matter what you combine them together.
    Last edited by MrEnder; 03-16-2010 at 04:10 AM.

  • #6
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,276
    Thanks
    28
    Thanked 272 Times in 266 Posts
    Quote Originally Posted by AlCapwn View Post
    So can you not use javascript to create forms that would be emailed to you?
    If I recall correctly, you used to be able to use <form enctype="text/plain" action="mailto:email@example.com"> to directly send an email formatted like "Field_Name = Field_Value" with one line per field.

    It's been maybe a decade since I did that (in IE5 or NN4?). I just tried it for a refresher and it doesn't seem to work anymore though; instead, my email client (Thunderbird) opens with a blank composition window in both Firefox and IE.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •