Solved

forms in html page

Posted on 1997-10-14
3
222 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 10 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

691 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