load csv file into a javascript file
<p>Is this possible ?  I am wanting to pull out a price of a product from the csv file and tie that price to its particular part number.</p>

<p>I am doing this for a website and I am learning script programming at the same time, and I am unsure how to do this.  </p>

<p>The JS file would call the csv file and pull the price and part number out of it.</p>

<p>From there the JS file will create a form to use with a Paypal shopping cart.</p>

<p>This is the paypal shopping cart code for the add to cart button:</p>

<pre><code>&lt;form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"&gt;
&lt;input type="hidden" name="cmd" value="_cart"&gt;
&lt;input type="hidden" name="business" value="XXXXX"&gt;
&lt;input type="hidden" name="lc" value="US"&gt;
&lt;input type="hidden" name="item_name" value="PartNumber1"&gt;
&lt;input type="hidden" name="amount" &gt;
&lt;input type="hidden" name="currency_code" value="USD"&gt;
&lt;input type="hidden" name="button_subtype" value="products"&gt;
&lt;input type="hidden" name="cn" value="Add special instructions to the seller"&gt;
&lt;input type="hidden" name="no_shipping" value="2"&gt;
&lt;input type="hidden" name="weight" value=".5"&gt;
&lt;input type="hidden" name="weight_unit" value="lbs"&gt;
&lt;input type="hidden" name="add" value="1"&gt;
&lt;input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted"&gt;
&lt;input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"&gt;
&lt;img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"&gt;
&lt;/form&gt;
</code></pre>

<p>Using the variable I added to this button, the JS file would look similar to this:</p>

<pre><code>function CalculateOrder(form)
{

if (form.item_name.value == "PartNumber1"
{
form.amount.value = (The price variable would go here);
}

if (form.item_name.value == "PartNumber2"
{
form.amount.value = (The price variable would go here);
}
}
</code></pre>

<p>What I need before this code in the JS file is the code that loads the csv file and outputs the price and part number.  The JS file would search for the part number labelled called "PartNumber1" and output the appropriate price from the csv file.</p>

<p>HELP PLEASE !!</p>
