Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WILL PAY FOR HELP calculating from drop down box and test field

    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
    Web and Business Development from Cornwall - Startbar.co.uk

  • #2
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    This'll get ya started.

    Code:
    <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>

  • #3
    Regular Coder
    Join Date
    Jul 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!
    Web and Business Development from Cornwall - Startbar.co.uk

  • #4
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Regular Coder
    Join Date
    Oct 2002
    Posts
    178
    Thanks
    3
    Thanked 0 Times in 0 Posts
    BTW What in the world is a 'one off payment'?

  • #6
    Regular Coder
    Join Date
    Jul 2004
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if someone wants to pay you for a service/product which isnt listed in your portfolio etc
    Web and Business Development from Cornwall - Startbar.co.uk


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •