forms in html page

Hello
How can I do a form with several fields wich after the user fullfiled them are sent to me by e-mail?
Thanks

asimoesAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

qed070297Commented:
"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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
asimoesAuthor Commented:
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
qed070297Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.