?
Solved

forms in html page

Posted on 1997-10-14
3
Medium Priority
?
233 Views
Last Modified: 2006-11-17
Hello
How can I do a form with several fields wich after the user fullfiled them are sent to me by e-mail?
Thanks

0
Comment
Question by:asimoes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
qed070297 earned 20 total points
ID: 1840424
"Mail" is a program external to the browser.  So, using
JavaScript or HTML by itself is impossible.

Through CGI, you can cause your public account to mail back to
some known account fairly easily via some temporary file
manipulation and shell commands.  The specifics are a matter of
learning CGI and having a reasonable grasp of C or Perl.

Alternatively, if your clients are running internet explorer
there are probably ways to do this with activeX.  Or more
generally, with Java Beans.
0
 

Author Comment

by:asimoes
ID: 1840425
Hello again.
Well, I thought that I need to learn CGI but this example that I'm showing to you makes the user field the form and after it will send the result to my mail.
Is this CGI code in an html page? And can I do this?
____________________________________________________-
<HTML>
<TITLE>Email form using OnChange and OnClick commands</TITLE>
<HEAD>

<script language="JavaScript">

var browsername = navigator.appName + " " + navigator.appVersion;
var getkey = browsername.substring(0, 12);

var next ="final.html";

var formfilled1 = "";
var formfilled2 = "";
var formfilled3 = "";
var formfilled4 = "";
var formfilled5 = "";
var formfilled6 = "";
var formfilled7 = "";
var formfilled8 = "";
var formfilled9 = "";


function senddata()
{
 if ((browsername.substring(0, 8)=="Netscape") &&  ((getkey=="Netscape 3.0") || (getkey=="Netscape 2.0")))
 {
 timerID=setTimeout('nextpage()',5000)
 return true;
 }
 if (browsername.substring(0, 9)=="Microsoft")
 {
 nextpage();
 return false;
 }
}

function nextpage()
{
 window.location=next;
}

function form1()
{}
function form2()
{}
function form3()
{}
function form4()
{}
function form5()
{}
function form6()
{}
function form7()
{}
function form8()
{}
function form9()

{}
</script>
</HEAD>


<BODY BGCOLOR="#00FFFF" TEXT="#000000" LINK="#00FF00" VLINK="#80FFFF" ALINK="#FF0000">


<FORM ENCTYPE='text/plain' NAME='mail' action='mailto:anecra@mail.telepac.pt'
 METHOD='GET' onSubmit='return senddata()'>

<center>
<B>INTRODUZA OS SEGUINTES DADOS:</b><P>
</center>

<TABLE WITDH="100%" BORDER=1>
<TR>
<TD width="150">

Nome da Empresa:<p>
Contacto:<br>
Morada:<br>
Codigo Postal:<br>
Localidade:<br>
Distrito:<br>
Telefone:<br>
Idade:<br>
Profissão:<br>
</TD>


<TD width="50%">
<INPUT NAME="nome" TYPE="text" width=15 OnChange="form1()"><br>
<INPUT NAME="contacto" TYPE="text" width=15 OnChange="form2()"><br>
<INPUT NAME="morada" TYPE="text" width=15 OnChange="form3()"><br>
<INPUT NAME="postal" TYPE="text" width=15 OnChange="form4()"><br>
<INPUT NAME="local" TYPE="text" width=15 OnChange="form5()"><br>
<INPUT NAME="distrito" TYPE="text" width=15 OnChange="form6()"><br>
<INPUT NAME="telefone" TYPE="text" width=15 OnChange="form7()"><br>
<INPUT NAME="idade" TYPE="text" width=15 OnChange="form8()"><br>
<INPUT NAME="profissao" TYPE="text" width=15 OnChange="form9()"><br>


</TD>
</TR>

</TABLE>
<P>

<BR>
<INPUT NAME="submitter" value="Enviar" TYPE=submit value="" OnClick="nextpage()">
<INPUT NAME="reset" value="Limpar" TYPE=reset value="" OnClick="nextpage()">


</form>
_________________________________________________
thanks

0
 
LVL 1

Expert Comment

by:qed070297
ID: 1840426
Psyche!  No, this is not using CGI.  This is a very scary piece
of HTML that tells me that Netscape (or perhaps this is a standard I was not aware of) has some extensions for bringing
CGI-like capability straight into HTML.  Notably the following
line:

  <FORM ENCTYPE='text/plain' NAME='mail'   action='mailto:anecra@mail.telepac.pt'
  METHOD='GET' onSubmit='return senddata()'>

is where the scary work is being done; referring to the "GET"
CGI communication mechanism.  Obviously it only works with
Netscape as is made obvious from your test near the beginning.

Well anyhow, good work in discovering this for yourself and for
presenting it here; I've learned something new.  BTW, where did
you pick this up?
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question