Closed Thread Icon

Preserved Topic: Submit form to view and print (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18218" title="Pages that link to Preserved Topic: Submit form to view and print (Page 1 of 1)" rel="nofollow" >Preserved Topic: Submit form to view and print <span class="small">(Page 1 of 1)</span>\

 
Minkies
Bipolar (III) Inmate

From: Johannesburg, Gauteng, South Africa
Insane since: Jan 2001

posted posted 07-30-2001 12:47

Hi all,

Iv'e just recently started on the scripting side of things (so please treat me like an idiot - kinda anyway )

What I'm trying to do is print to a page (form1.jsp) from a form (form1.html)
When i click send, the form.jsp doesn't show the fields values that you typed in form1.html
( The form .)
Please help as i am not sure where i am going wrong.

ps: I have no knowledge of scripting, I found this script on Mark Youngs tute page.

heres the form1.html
<html>
<body>
<form action="form1.jsp" method="get" name="formone">
<table>
<tr>
<td width="60"><b>Name</b>
<td width="150"><input type="text" name="name"></td>
</tr>
<tr>
<td><b>Surname</b>
<td><input type="text" name="surname"></td>
</tr>
<tr><td><b>Number</b>
<td><input type="text" name="number"></td>
</tr>
<tr><td><b>E-mail</b>
<td><input type="text" name="mail"></td>
</tr>
<tr><td colspan=2 align=right><input type="submit" value="Send"></td>
</tr>
</table>
</form>
</body>
</html>

and the form1.jsp
<html><head>
<script language="JavaScript">
<!--
function getParameter() {
alert(document.formone.inputone.value);
}
//-->
</script>

</head>
<body>
<table>
<tr>
<td width="60"><b>Name</b>
<td width="150">:&nbsp;<%= request.getParameter("name") %></td>
</tr>
<tr>
<td><b>Surname</b>
<td>:&nbsp;<%= request.getParameter("surname") %></td>
</tr>
<tr><td><b>Number</b>
<td>:&nbsp;<%= request.getParameter("number") %></td>
</tr>
<tr><td><b>E-mail</b>
<td>:&nbsp;<%= request.getParameter("email") %></td>
</table>
</body>
</html>


The person born with a talent they are meant to use, will find their greatest happiness in using it.

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-30-2001 14:12

Well, the data is getting to the second page. You can tell by looking at the URL - it contains all the field info.

To me, it looks like your function is looking for a form on THAT page, and not the previous page.

"It takes months to find a customer, more than 5 seconds of load time to lose one."

Minkies
Bipolar (III) Inmate

From: Johannesburg, Gauteng, South Africa
Insane since: Jan 2001

posted posted 07-30-2001 14:45

"To me, it looks like your function is looking for a form on THAT page, and not the previous page."

makes sense i guess...but how do i make it work so that you see it on the form1.jsp page.
The whole purpose of this exercise is to:
* type in the info in the fields on the form1.html page
* press submit
* new page comes up with the info you filled in
* you print the page, sign it and fax it to the company

um...another question...

can you give the form two value:
* one value to print to a new page
* another value to send the form via e-mail to the sites owner.
(not sure what the term is for the above query )




The person born with a talent they are meant to use, will find their greatest happiness in using it.

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-30-2001 15:23

Well, I'm no good at .jsp. It's just something I noticed.

As for your last question, I'm not sure I know what you mean. Do you mean you want to print the variables on the page AND send an email to the webmaster? If that's so, that shouldn't be a problem, since you could just call the email script from within the second page. Again, not knowing .jsp..........

"It takes months to find a customer, more than 5 seconds of load time to lose one."

Minkies
Bipolar (III) Inmate

From: Johannesburg, Gauteng, South Africa
Insane since: Jan 2001

posted posted 07-30-2001 16:14

yes... i want to be able to recieve the values in an e-mail format - as well as allow the client to print it


The person born with a talent they are meant to use, will find their greatest happiness in using it.

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-30-2001 17:37

What I do with PHP is just put the email script right into the "output" page. It then emails the results, and prints them onto the page.

Hope this helps.

"It takes months to find a customer, more than 5 seconds of load time to lose one."

Minkies
Bipolar (III) Inmate

From: Johannesburg, Gauteng, South Africa
Insane since: Jan 2001

posted posted 07-31-2001 08:59

Thanks

I've decided to use PHP (the echo function)

works like a bomb

thanks guys


The person born with a talent they are meant to use, will find their greatest happiness in using it.

« BackwardsOnwards »

Show Forum Drop Down Menu