...

View Full Version : WILL PAY FOR HELP calculating from drop down box and test field



startbar
03-25-2006, 01:15 AM
hi - please add me to msn - halo6ix@hotmail.com if you intend to work on this for me. Im in the UK and i need some sleep its 1.20am! but ill be up early!

i will paypal a small reward for someone who can help me please very quickly.

Basically i need a page with some drop down boxes (with numerical values) and a text field (which user inputs number) and then another text box that shows the total as the numbers are entered. Example:


1) Pull down window 1 - I would like to pay for lighting <= 50>
2) Pull down window 2 - I would like to pay for plug point <=50>
3) One off payment = <field for user to enter amount - max 150>
4) My stand number is: <field for stand number> Mandatory field
OR:
5) I am making a one off payment for (please specify) <field for text/numerics)
6) Total
7) Submit


because of nochex the form must include


<form action="https://secure.nochex.com" method=post name=quickpay onsubmit="return submitForm();">

and

<input name="cancelurl" type="hidden" value="https://www.nochex.com/quicksend/">


I need to then impliment this total into a form to send as a payment with nochex - sounds complicated but i dont think it is for you guys!

Do this for me and i will be so grateful ill paypal you a small cash reward

Needs to be dont ASAP like before early afternoon on saturday 25th March

thanks

doni
03-25-2006, 05:21 AM
This'll get ya started.



<html><script type="text/javascript">
function changetext(whichcontent){
if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
cross_el.innerHTML=whichcontent
}
else if (document.layers){
document.d1.document.d2.document.write(whichcontent)
document.d1.document.d2.document.close()
}
}
function update(){
var f1 = document.quickpay;
var amt = 0
if (f1.lighting.checked){
amt += 50;
}
if (f1.plug.checked){
amt += 50;
}
if (f1.oneoff.value >= 0 && f1.oneoff.value <= 150){
amt2 = f1.oneoff.value;
if(amt2 >= 1){
amt2 = amt2/1;
}
amt = amt + amt2;
changetext("<b>Total:</b>" + amt);
}else{
changetext("<b>Total:</b>" + amt + "<br>The One Off payment must be a numeric value less than 150 and greater than or equal to zero");
}
f1.total.value=amt;
}
</script>
<body onload="changetext('<b>Total:</b> 0')">
<form action="https://secure.nochex.com" method=post name=quickpay onsubmit="return submitForm();">
<input type="checkbox" name="lighting" onclick="update()">I would like to pay for lighting - $50<br>
<input type="checkbox" name="plug" onclick="update()">I would like to pay for a plug point - $50<br>
<input type="text" name="oneoff" onkeyup="update()">I would like to make a one off payment - $150 max
<ilayer id="d1" width="35" height="15" visibility="hide">
<layer id="d2" width="35" height="15">
<div id="descriptions" align="left">

<!-- javascript function add text here -->

</div>
</layer>
</ilayer>
<br><br>
<input name="cancelurl" type="hidden" value="https://www.nochex.com/quicksend/">
<input type="submit">
</form>
<body>

startbar
03-25-2006, 09:47 AM
excellent mate thanks

however the form when submitted doesnt add the amount into the nochex quickpay form which is the essential bit! any ideas? i have made these changes to make the total appear in a textbox for this purpose.


<html>

<script type="text/javascript">
function changetext(whichcontent){
if (document.all||document.getElementById){
cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
cross_el.innerHTML=whichcontent
}
else if (document.layers){
document.d1.document.d2.document.write(whichcontent)
document.d1.document.d2.document.close()
}
}
function update(){
var f1 = document.quickpay;
var amt = 0
if (f1.lighting.checked){
amt += 50;
}
if (f1.plug.checked){
amt += 50;
}
if (f1.oneoff.value >= 0 && f1.oneoff.value <= 150){
amt2 = f1.oneoff.value;
if(amt2 >= 1){
amt2 = amt2/1;
}
amt = amt + amt2;
changetext("Total: <input type='text' name='amount'>");
}else{
changetext("Total: <input type='text' name='amount'>" + "<br>The One Off payment must be a numeric value less than 150 and greater than or equal to zero");
}
f1.amount.value=amt;
}
</script>
<body onload="changetext('<b>Total: <input type='text' name='total'></b>')">
<form action="https://secure.nochex.com" method=post name=quickpay onsubmit="return submitForm();">
<input type="checkbox" name="lighting" onclick="update()">I would like to pay for lighting - $50<br>
<input type="checkbox" name="plug" onclick="update()">I would like to pay for a plug point - $50<br>
<input type="text" name="oneoff" onkeyup="update()">I would like to make a one off payment - $150 max
<ilayer id="d1" width="35" height="15" visibility="hide">
<layer id="d3" width="35" height="15">
<div id="descriptions" align="left">

<!-- javascript function add text here -->

</div>
</layer>
</ilayer>
<br><br>
<input name="cancelurl" type="hidden" value="https://www.nochex.com/quicksend/">
<input type="submit" value="Continue" name=submit1>
</form>
<body>

help asap thanks!!

doni
03-25-2006, 04:23 PM
No I don't know anything about nochex. But there's probably a specific name you'll have to assign to the 'total' field for iti to work. I'd check nochex's web site.

doni
03-25-2006, 04:25 PM
BTW What in the world is a 'one off payment'?

startbar
03-26-2006, 09:55 AM
if someone wants to pay you for a service/product which isnt listed in your portfolio etc



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum