Note that there are some explanatory texts on larger screens.

plurals
  1. POPopulate paypal form according to image clicked
    primarykey
    data
    text
    <p>I want to populate a paypal form based on the user clicking on images.</p> <pre><code>$('a.thumbnail').click(function(){ var src = $(this).attr('href'); if (src != $('img#largeImg').attr('src').replace(/\?(.*)/,'')){ $('img#largeImg').stop().animate({ opacity: '0' }, function(){ $(this).attr('src', src+'?'+Math.floor(Math.random()*(10*100))); }).load(function(){ $(this).stop().animate({ opacity: '1' }); }); } return false; }); </code></pre> <p>There are 2 sets of images, the user selects the colors he wants and according to the choices the selection in the paypal menu will change. for example - color1=black, color2=Brown</p> <pre><code>&lt;form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"&gt; &lt;input type="hidden" name="cmd" value="_s-xclick"&gt; &lt;input type="hidden" name="hosted_button_id" value="FEM2HYYCALHEE"&gt; &lt;table&gt; &lt;tr&gt;&lt;td&gt;&lt;input type="hidden" name="on0" value="Chassis"&gt;Chassis&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;select name="os0"&gt; &lt;option value="Black"&gt;Black &lt;/option&gt; &lt;option value="Copper"&gt;Copper &lt;/option&gt; &lt;option value="Gold"&gt;Gold &lt;/option&gt; &lt;/select&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;&lt;input type="hidden" name="on1" value="Lens"&gt;Lens&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;select name="os1"&gt; &lt;option value="Green"&gt;Green &lt;/option&gt; &lt;option value="Grey"&gt;Grey &lt;/option&gt; &lt;option value="Brown"&gt;Brown &lt;/option&gt; &lt;option value="Amber"&gt;Amber &lt;/option&gt; &lt;option value="Yellow"&gt;Yellow &lt;/option&gt; &lt;/select&gt; &lt;/td&gt;&lt;/tr&gt; </code></pre> <p>The dropdown menu does not have to be visible, preferably after the user clicks on the images he will click "buy now" and the colors will be updated. <a href="http://cliponexpress.com/test/mosaicex/test2.html" rel="nofollow">See the current version of the page.</a></p> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload