Note that there are some explanatory texts on larger screens.

plurals
  1. POInsert barcode after order ID in a list of orders generated by Volusion
    primarykey
    data
    text
    <p>I have an order receipt page auto generated by our system. I need to add barcodes for each order number. I have the basis set up, but I am running into two problems.</p> <p>1) The barcode is printing using the first order number each time. I need each order to print its own bar code right below. (orders are in sequential order, but sometimes can skip order numbers)</p> <p>2) The jquery is running multiple times as the system is going to place the code after each order. I cannot remove the jquery after each order, so how can I make it only run once after all orders have been loaded to the single document.</p> <p>Below is a small piece of the entire order. I have used table width and font size to declare the areas I need as the system did not give them ids or classes. The only nice thing is font size 3 is never used anywhere else and same as table width 180, so I believe I will be fine in both cases. Thank you for your help.</p> <p>jQuery code</p> <pre><code>$("table[width='180']").after("&lt;img id='bar_code'"); $('img#bar_code').attr('src', 'http://www.barcodesinc.com/generator/image.php?code=' + $("font[size='3']").children().html() + '&amp;style=197&amp;type=C128B&amp;width=150&amp;height=50&amp;xres=1&amp;font=3'); </code></pre> <p>HTML code</p> <pre><code> &lt;table width=180 border=0 cellpadding=0 cellspacing=0&gt; &lt;tr&gt; &lt;td width=90 align=left colspan="2"&gt;&lt;b&gt;&lt;font style="font-size:18px;font-weight:bold;"&gt;PACKING SLIP&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=90 align=left&gt;&lt;b&gt;Date:&lt;/b&gt;&lt;/td&gt; &lt;td width=90&gt;&lt;b&gt;Order#:&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=75 align=left&gt; 05/17/2011 &lt;/td&gt; &lt;td&gt;&lt;font size=3&gt;&lt;b&gt;10122&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $("table[width='180']").after("&lt;img id='bar_code'"); $('img#bar_code').attr('src', 'http://www.barcodesinc.com/generator/image.php?code=' + $("font[size='3']").children().html() + '&amp;style=197&amp;type=C128B&amp;width=150&amp;height=50&amp;xres=1&amp;font=3'); &lt;/script&gt; &lt;table width=180 border=0 cellpadding=0 cellspacing=0&gt; &lt;tr&gt; &lt;td width=90 align=left colspan="2"&gt;&lt;b&gt;&lt;font style="font-size:18px;font-weight:bold;"&gt;PACKING SLIP&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=90 align=left&gt;&lt;b&gt;Date:&lt;/b&gt;&lt;/td&gt; &lt;td width=90&gt;&lt;b&gt;Order#:&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=75 align=left&gt; 05/17/2011 &lt;/td&gt; &lt;td&gt;&lt;font size=3&gt;&lt;b&gt;10123&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $("table[width='180']").after("&lt;img id='bar_code'"); $('img#bar_code').attr('src', 'http://www.barcodesinc.com/generator/image.php?code=' + $("font[size='3']").children().html() + '&amp;style=197&amp;type=C128B&amp;width=150&amp;height=50&amp;xres=1&amp;font=3'); &lt;/script&gt; &lt;table width=180 border=0 cellpadding=0 cellspacing=0&gt; &lt;tr&gt; &lt;td width=90 align=left colspan="2"&gt;&lt;b&gt;&lt;font style="font-size:18px;font-weight:bold;"&gt;PACKING SLIP&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=90 align=left&gt;&lt;b&gt;Date:&lt;/b&gt;&lt;/td&gt; &lt;td width=90&gt;&lt;b&gt;Order#:&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=75 align=left&gt; 05/17/2011 &lt;/td&gt; &lt;td&gt;&lt;font size=3&gt;&lt;b&gt;10124&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $("table[width='180']").after("&lt;img id='bar_code'"); $('img#bar_code').attr('src', 'http://www.barcodesinc.com/generator/image.php?code=' + $("font[size='3']").children().html() + '&amp;style=197&amp;type=C128B&amp;width=150&amp;height=50&amp;xres=1&amp;font=3'); &lt;/script&gt; &lt;table width=180 border=0 cellpadding=0 cellspacing=0&gt; &lt;tr&gt; &lt;td width=90 align=left colspan="2"&gt;&lt;b&gt;&lt;font style="font-size:18px;font-weight:bold;"&gt;PACKING SLIP&lt;/font&gt;&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=90 align=left&gt;&lt;b&gt;Date:&lt;/b&gt;&lt;/td&gt; &lt;td width=90&gt;&lt;b&gt;Order#:&lt;/b&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width=75 align=left&gt; 05/17/2011 &lt;/td&gt; &lt;td&gt;&lt;font size=3&gt;&lt;b&gt;10127&lt;/b&gt;&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $("table[width='180']").after("&lt;img id='bar_code'"); $('img#bar_code').attr('src', 'http://www.barcodesinc.com/generator/image.php?code=' + $("font[size='3']").children().html() + '&amp;style=197&amp;type=C128B&amp;width=150&amp;height=50&amp;xres=1&amp;font=3'); &lt;/script&gt; </code></pre>
    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