[thelist] JavaScript Help Needed

Joshua Olson joshua at waetech.com
Tue Aug 3 10:27:12 CDT 2004

> -----Original Message-----
> From: Rich Points
> Sent: Tuesday, August 03, 2004 10:44 AM

> I'm setting up a PayPal account for a client and I'm trying to
> use a JavaScript to handle a price range.
> The range is
> 1-9 =      $2.00 each
> 10-50 = $1.00 each

> this is the page I'm running it from http://amiba.net/merchandise2.html


I think that you may be going about this the hard way.  Try something
catered to your situation for better results.  Example (untested code, so be

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"
 onsubmit="this.target = 'paypal';
 ReadForm (this);">
      <input type="hidden" name="cmd" value="_cart" />
      <input type="hidden" name="business" value="info at AMIBA.net" />
      <input type="hidden" name="item_name" value="" />
      <input type="hidden" name="amount" value="quantity" />
      <input type="hidden" name="no_note" value="1" />
      <input type="hidden" name="currency_code" value="USD" />
      <input type="hidden" name="add" value="1" />
      <input type="hidden" name="image_url"
value="https://amiba.net/images/amiba_logo.gif" />
      <input type="hidden" name="receiver_email" value="info at AMIBA.net" />
      <input type="hidden" name="no_shipping" value="0" />

      <input type="hidden" name="baseamt" value="2.00" />
      <input type="hidden" name="basedes" value="Put Your Money Where Your
House Is bumper sticker" />

<select onchange="qty = this.options.selectedIndex;  els =
this.form.elements;  els.item_name.value = els.basedes.value + ', ' + qty;
if (qty >= 10) els.amount.value = qty; else els.amount.value = 2 * qty;">
        <option value="0"></option>
        <option value="1">1</option>
        <option value="2">2</option>
        <option value="3">3</option>
        <option value="4">4</option>
        <option value="5">5</option>
        <option value="6">6</option>
        <option value="7">7</option>
        <option value="8">8</option>
        <option value="9">9</option>
        <option value="10">10</option>
        <option value="11">11</option>
        <option value="12">12</option>
        <option value="13">13</option>
        <option value="14">14</option>
        <option value="15">15</option>
        <option value="16">16</option>
        <option value="17">17</option>
        <option value="18">18</option>
        <option value="19">19</option>
        <option value="20">20</option>
      <input type="image" src="/images/add_to_cart.gif" name="submit"
alt="cart add" />


Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list