transferring input into a form into a printable page

Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

scootertiki

Thread Starter
Joined
Oct 10, 2001
Messages
38
I have a simple "add it up" form, that adds up different values. I would like to know how to transfer the selected information into a printable page. For instance, there are drop down menus, where someone chooses what they want, each choice has a value assigned to it, and then they can click calculate for the total. I would like the choices that are choosen to be transferred to a printable page, (a order confirmation type page). So there would be a page that the person could print out, that would not have the format of the drop-down menus. Is that possible, or would I need to have some scripting written for that???

Any suggestions are very appreciated!
Thanks,
Liz:p
 

scootertiki

Thread Starter
Joined
Oct 10, 2001
Messages
38
I am using front page, the form I have is javascript.

Here is the most important part of the script. The values that the person selects is what I want transferred in a simple format. Such as if they clicked on 4' x 4', 1 x 2 window, and no accessories. The display that I am after would look something like this:
SIZE: 4 x 4
Window: 1 x 2
Accessories: none
I took some tags out so that it would show the html language instead of the function, so I know there are some things missing, but you can get the basic idea.

Thank you for any help!

SCRIPT LANGUAGE="JavaScript"
!--
function AddItUp(form) {
var item, SIZE, WINDOW, ACCESSORIES;

// Get the value of the item that's selected in the first list
item = form.SIZE.selectedIndex;
SIZEValue = eval(form.SIZE.options[item].value)

// Get the value of the item that's selected in the second list
item = form.WINDOW.selectedIndex;
WINDOWValue = eval(form.WINDOW.options[item].value)

// Get the value of the item that's selected in the third list
item = form.ACCESSORIES.selectedIndex;
ACCESSORIESValue = eval(form.ACCESSORIES.options[item].value)

// Add up the value and display the total
form.total.value = SIZEValue + WINDOWValue + ACCESSORIESValue
}
//-->
SCRIPT

HEAD

BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 BGCOLOR=#FFFFFF>


A NAME="top"></A>

SCRIPT LANGUAGE="JavaScript">
!--
var browserName = navigator.appName;
var browserVer = parseInt(navigator.appVersion);
if (browserName == "Netscape" && browserVer == 2) {
document.open();
document.write("<FONT COLOR=#000000><B>
//-->
SCRIPT>

DIV STYLE="margin-left: 5px; font-family: Arial, Verdana, Helvetica, Geneva, 'MS Sans Serif'">

CENTER><TABLE WIDTH=610 CELLSPACING=0 CELLPADDING=0><TR><TD><IMG SRC="/Graphics/spacer.gif" HEIGHT=1 WIDTH=610><BR>

P>


CENTER>

FORM>

TABLE BORDER=0 CELLPADDING=2>
TR>
TD ALIGN=RIGHT>SIZE:</TD>
TD>
SELECT NAME="SIZE">
<OPTION VALUE=2400>4' X 4'
<OPTION VALUE=3550>4' X 6'
<OPTION VALUE=4700>6' X 6'
SELECT>
TD>
TR>

TR>
TD ALIGN=RIGHT>WINDOW:</TD>
TD>
SELECT NAME="WINDOW">
OPTION VALUE=0>1 X 2 door window
<OPTION VALUE=56>Exchange for 3 x 3 window
<OPTION VALUE=280>additional 3 x 3 window
SELECT>
TD>
TR>

TR>
TD ALIGN=RIGHT>ACCESSORIES:</TD>
TD>
SELECT NAME="ACCESSORIES">
<OPTION VALUE=1125>Handicap door and ramp
<OPTION VALUE=350>additional vent system
<OPTION VALUE=85>light
SELECT>
TD>
TR>
TR>
TD ALIGN=RIGHT>Total:</TD>
TD>

INPUT
TYPE=TEXT
NAME=total
SIZE=7

TD>
TR>

TR>
TD ALIGN=CENTER COLSPAN=2>
INPUT
TYPE=BUTTON
NAME="cmdCalc"
VALUE="Calculate"
onClick=AddItUp(this.form)>

TD>
TR>
TABLE>
FORM>
CENTER>
HR>

address>
address>




TD></TR></TABLE>
BODY>



:p
 
Joined
Jul 29, 2001
Messages
21,334
You don't need to calculate values here it seems. All you need to do is pass the values that are in the selection boxes and pass them to another page. I know how to do it in ASP but not in java script.
 

scootertiki

Thread Starter
Joined
Oct 10, 2001
Messages
38
Would that happen to be apache asp??? that is all our server supports! Are cookies hard to set and retrieve??

thanks, liz
 
Joined
Jul 29, 2001
Messages
21,334
I don't think active server pages will run on an Apache web server unless they have their own version. Not sure about the cookies though.
 
Status
This thread has been Locked and is not open to further replies. The original thread starter may use the Report button to request it be reopened but anyone else with a similar issue should start a New Thread. Watch our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top