Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplay javascript variable in wordpress
    primarykey
    data
    text
    <p>Hi I have the following which I would like the total to be displayed on a confirmation page but I am unable to achieve this.</p> <pre><code>var totalPrice = $(price).val() * $(payslips-required).val(); $(total).val(totalPrice); </code></pre> <p>price and payslips-required are taken from a form. The price is multiplied by the the number of payslips-required to gain the total. </p> <p>I have tried document write to display but I am not able to do this in the contact form 7 plugin on wordpress it causes the info on the confirmation page to disappear.</p> <p>I would like it to display the total within or tags if possible. </p> <pre><code>&lt;div id="total"&gt;Total&lt;span id="totalprice"&gt;&lt;/span&gt;&lt;/div&gt; </code></pre> <p>I want it to display the total in the span tag </p> <p>Any help would be greatly appreciated </p> <p>UPDATE</p> <pre><code>&lt;div id="confirm"&gt;&lt;h2 id="myAnchor"&gt;Please verify order confirmation and proceed&lt;/h2&gt; &lt;br /&gt; &lt;div id="total"&gt;Total&lt;span id="totalprice"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/br /&gt; &lt;label&gt;Title:&lt;/label&gt; [title]&lt;br /&gt; &lt;label&gt;Marital Status:&lt;/label&gt; [marital-status]&lt;br /&gt; &lt;label&gt;First Name:&lt;/label&gt; [first-name]&lt;br /&gt; &lt;label&gt;Middle Name:&lt;/label&gt; [middle-names]&lt;br /&gt; &lt;label&gt;Last Name:&lt;/label&gt; [last-name]&lt;br /&gt; &lt;label&gt;Home Address:&lt;/label&gt; [home-address]&lt;br /&gt; &lt;label&gt;Postcode:&lt;/label&gt; [postcode]&lt;br /&gt; &lt;label&gt;Email:&lt;/label&gt; [email]&lt;br /&gt; &lt;label&gt;Contact Number:&lt;/label&gt; [contact-number]&lt;br /&gt; &lt;label&gt;Delivery Address:&lt;/label&gt; [delivery-address]&lt;br /&gt; &lt;label&gt;Postcode:&lt;/label&gt; [delivery-postcode]&lt;br /&gt; &lt;label&gt;Gross Annual Salary:&lt;/label&gt; [annual-salary]&lt;br /&gt; &lt;label&gt;Monthly NET Pay:&lt;/label&gt; [monthly-netpay]&lt;br /&gt; &lt;label&gt;Method of Pay:&lt;/label&gt; [payment-method]&lt;br /&gt; &lt;label&gt;Payslips Required:&lt;/label&gt; [payslips-required] £[price]&lt;br /&gt; &lt;label&gt;Years Required:&lt;/label&gt; [years-required]&lt;br /&gt; &lt;label&gt;Day of the month you are paid:&lt;/label&gt; [dayof-pay] &lt;br /&gt; &lt;label&gt;Month Required:&lt;/label&gt; [months-required]&lt;br /&gt; &lt;label&gt;Which Payslip is required:&lt;/label&gt; [payslip-chosen]&lt;br /&gt; &lt;label&gt;Taxcode:&lt;/label&gt; [taxcode]&lt;br /&gt; &lt;label&gt;National Insuarance Number :&lt;/label&gt; [nh1] [nh2] [nh3] [nh4] [nh5]&lt;br /&gt; &lt;label&gt;Date of Starting job:&lt;/label&gt; [date-of-starting-job]&lt;br /&gt; &lt;label&gt;Payslip ref no:&lt;/label&gt; [payslip-ref-no]&lt;br /&gt; &lt;label&gt;Company Name:&lt;/label&gt; [company-name]&lt;br /&gt; &lt;a href="#" class="submit"&gt;Continue to Payment&lt;/a&gt; &lt;a href="javascript:fadeIn('hideme');" class="edit"&gt;Cancel/ Redo&lt;/a&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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