www.webdeveloper.com
Results 1 to 2 of 2

Thread: Onchange code

  1. #1
    Join Date
    Jul 2009
    Posts
    38

    Onchange code

    I want the script to change the prices on change. There is a couple places where the price should change. Once on each button and the displaying prices that correspond with it.

    The options and the prices that should be displayed.
    If 200 and standard exposure = 4.43 Paypal and 4.36 AlertPay
    (Just make it easy for me to edit please and thank you)




    Oh and I can't get them side by side(and stay inside the table).


    Code:
    <td cellspacing="10" width="690" VALIGN=center align=center  BGCOLOR="#33FF00">
    <font color="#black"><h2>Buy Clicks</h2></center>
    
    
    <form method="post" action="#" style="display:inline" onsubmit="return false();" name="pf"><table cellpadding="2" cellspacing="0" align="center"><tr><td style="font-weight:bold;" align="right">Member Clicks:&nbsp;</td><td><select name="cliques" id="$c" onchange="valores();" class="campotexto" style="width:150px;"><option value="200">200</option><option value="500">500</option><option value="1000">1000</option><option value="2000">2000</option><option value="5000">5000</option></select>&nbsp;</td><td>
    
    </td></tr><tr><td style="font-weight:bold;" align="right">Type:&nbsp;</td><td><select name="exposicao" id="$e" onchange="valores();" class="campotexto" style="width:150px;"><option value="15">Mini Exposure</option><option value="30" selected>Standard Exposure</option><option value="60">Extended Exposure</option></select>&nbsp;</td><td>
    
    </td></tr></table></form>
    
    
    <br>
    <center>
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="business" value="fooziazzubaidi@gmail.com">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="item_name" value="Purchase Clicks">
    <input type="hidden" name="amount" value="4.43">
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" name="submit" border="0" height="40" width="100" src="images/paypal.gif">
    <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
    </form>
    <div align="center" name="pptotal" id="pptotal" style="color:#333333;font-size: 34px;font-weight: bold">$4.43</div>
    <br>
    
    <form method="post" action="https://www.alertpay.com/PayProcess.aspx" >
    <input type="hidden" name="ap_purchasetype" value="item-goods"/>
    <input type="hidden" name="ap_merchant" value="big_f@sbcglobal.net"/>
    <input type="hidden" name="ap_itemname" value="Purchase Clicks"/>
    <input type="hidden" name="ap_currency" value="USD"/>
    <input type="hidden" name="ap_returnurl" value="https://70.134.103.192/customptc/?u=c&s=pba"/>
    <input type="hidden" name="ap_itemcode" value="30x200"/>
    <input id="ap_quantity" type="hidden" name="ap_quantity" value="1"/>
    <input type="hidden" name="ap_amount" value="4.36"/>
    <input type="hidden" name="ap_cancelurl" value="https://70.134.103.192/customptc/?u=c&s=pba"/>
    <input type="image" name="ap_image" src="https://www.alertpay.com/Images/BuyNow/big_pay_03.gif"/></form>
    <div align="center" name="pptotal" id="pptotal" style="color:#333333;font-size: 34px;font-weight: bold">$4.36</div>
    Last edited by Xaldin; 08-29-2009 at 05:35 PM.

  2. #2
    Join Date
    Jul 2009
    Posts
    38
    I just need the first 1 or 2 javascript codes done. I can do the rest.

    Javascript hates me.
    Code:
    <script type="text/javascript">
    function valores()
    {
    var c=document.getElementById("$c")
    var e=document.getElementById("$e")
    if (c===200&&e===15)
     {
     document.getElementById('pptotal').value = 1.50.text;
     }
    
    }
    </script>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles