Tech Support Guy banner
Status
Not open for further replies.
1 - 6 of 6 Posts

·
Registered
Joined
·
38 Posts
Discussion Starter · #1 ·
Hey I am still having trouble taking info from a form to a printable page. Now I want to take the simple add it up form that I have and transfer all the items they add up and the total to a printable page. Are cookies the way to go. Should I set a cookie and retrieve it, and how do I set a cookie to the javascript that calculates my total?

Here is my add up form.
P>Size
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>4' x 4'4' x 6'/OPTION>4' x 8'6' x 6'
OPTION VALUE="6300">8' x 8'8' x 12'
/P>
P>Ceiling Height-(at least 8'?)
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>YesNo
/P>
P>Door Hinge
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>LeftRight
/P>
P>1' x 2' Door Window
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>YesExchange for 3' x 3'Door window & 3' x 3'
/P>
P>Caster Wheels
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>NoYes
/P>
P>Sub Floor Foam
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>YesNo
/P>
P>Ventilation System
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>YesNo
/P>
P>Vent Fan Size
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>RecordingPracticing
/P>
P>Fluorescent Light
OPTION VALUE="0" SELECTED="SELECTED">-- Select --/OPTION>YesNo
/P>
Total Price
/P>
/FORM>
SCRIPT LANGUAGE="JavaScript"
var price1 = 0 ;
var price2 = 0 ;
var price3 = 0 ;
var price4 = 0 ;
var price5 = 0 ;
var price6 = 0 ;
var price7 = 0 ;
var price8 = 0 ;
var price9 = 0 ;
var price10 = 0 ;
var price11 = 0 ;
var price12 = 0 ;
var price13 = 0 ;
var price14 = 0 ;
var totalprice = 0 ;

function totalPrice() {
price1 = parseInt (document.MyForm.size.value );
price2 = parseInt (document.MyForm.ceiling.value );
price3 = parseInt (document.MyForm.hinge.value );
price4 = parseInt (document.MyForm.window.value );
price5 = parseInt (document.MyForm.wheels.value );
price6 = parseInt (document.MyForm.subfloor.value );
price7 = parseInt (document.MyForm.vent.value );
price8 = parseInt (document.MyForm.fan.value );
price9 = parseInt (document.MyForm.light.value ); totalprice = price1 + price2 + price3 + price4 + price5 + price6 + price7 + price8 + price9
document.MyForm.total.value = totalprice

Any suggestions?? I am pulling my hair out over this one!

:confused:
 

·
Registered
Joined
·
213 Posts
What scripting languages can you use on your server?

If you can use ASP is is a simple matter of (on your target page - saved with the .asp extension) calling the value like this:

Code:
<%= request.form("total price")%>
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #3 ·
My server only supports apache asp, and perl5 and php5 i believe.
I dont know anything about apache asp. I definitely in between a rock and a hard place. What I am trying to do, seems fairly simple, but I have yet to get a workable solution.

Thanks,
Liz
 

·
Registered
Joined
·
38 Posts
Discussion Starter · #5 ·
im not so sure about that, because my host said that i must understand that apache asp is not the same as microsoft asp.

But, to try your suggestion, would I need to put anything else on the additup page? How would i link them?? Sorry, just i dont understand the steps.

Thanks,
Liz
 

·
Registered
Joined
·
213 Posts
have your form action point to "test.asp".

Code:
<form method="post" action="test.asp">
your form goes here
</form>
Then... in test.asp try this to see if it works:

Code:
&lt%=request.form("oneofyourformfieldnamesgoeshere")%>
If it works, you should see the value printed out when you call the test.asp page from the browser.

I checked a site about apache asp and I see that it basically runs perl scripts inside the asp tags. I know nothing about Perl....so it this doesn't work I'm out of my league!

But this link might help:

http://asp.startcom.org/eg/response.asp
 
1 - 6 of 6 Posts
Status
Not open for further replies.
Top