[thelist] (MORE) JavaScript Help Needed

Rich Points rich at richpoints.com
Tue Aug 3 13:49:39 CDT 2004


Now the client has made a change and wants the pricing scenario to look like
this

1 sticker cannot be ordered
2 for $5 (this is the minimum order)
3-9 $2 each
10-50 $1 each

thanks to Joshua who provided the following solution to my previous post

<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;">

I'm now working from this page http://amiba.net/merchandise3.html

I'm guessing the answer is simple but I have almost no experience with
JavaScript; I'm a designer.
Any help is appreciated.

Thanks
Rich

----- Original Message ----- 
From: "Joshua Olson" <joshua at waetech.com>
To: <thelist at lists.evolt.org>
Sent: Tuesday, August 03, 2004 9:27 AM
Subject: RE: [thelist] JavaScript Help Needed


> > -----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
>
> Rich,
>
> 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
> careful):
>
> <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>
>       </select>
>       <input type="image" src="/images/add_to_cart.gif" name="submit"
> alt="cart add" />
>   </form>
>
> HTH,
>
> <><><><><><><><><><>
> Joshua Olson
> Web Application Engineer
> WAE Tech Inc.
> http://www.waetech.com/service_areas/
> 706.210.0168
>
>
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>




More information about the thelist mailing list