Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7758955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:30:11+00:00 2026-06-01T13:30:11+00:00

Without getting in to too much detail and without people getting too hung up

  • 0

Without getting in to too much detail and without people getting too hung up on it.

The variable backup currency for this case is equal to $.

I’m using Chrome V8 in the section where the variable is passed to the HTML so I can use basic Javascript functions there but NO jQuery.

I’m passing a variable into the HTML via Template Toolkit like so:

var backupcurrency =   [% backupcurrency %];

Then in my JS:

var temp = backupcurrency + '';
console.log(typeof(temp));     
console.log(temp);

The output from this is that temp is a string but the value of temp is NOT ‘$’ and instead for the value I get:

function (a,b){return new e.fn.init(a,b,h)}

I’m thinking maybe I can append to the string in the Chrome v8 step so that the dollar sign is escaped but I should be able to do that in the Jquery anyway.

Now I know this has to do with using Jquery but how do I literally print the $ – dollar sign AND deal with the case that the currency is equal to the dollar sign because if the variable is equal to £ or € I don’t want those user’s having issues?

Here is the code I want to use the variable in (again high level to avoid any confusion)

HTML:

<div id="upsell"></div>

JS:

var prod = "<div id='upselltext'><h6>Price: " + temp + backupvalue + "/year</h6></div>";

$('#upsell').append(prod);

backup value is a number, in this case ‘12.50’

EDIT:

Ok solved this by using JSON.stringify() on the variable before it was passed to the HTML

stash({backupcurrency: JSON.stringify(backupcurrency), backupvalue: backupvalue });

then the HTML remains the same but instead it is recognised as a character by jquery.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:30:12+00:00Added an answer on June 1, 2026 at 1:30 pm

    I don’t know anything about Template Toolkit, but if ‘&#36‘ (with space character) works, then try ‘&#36;‘ (with semicolon instead of space).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On his blog Scott Kovatch writes: Without getting into too much detail, typing ‘java
Without getting into too much detail, I have a process in my iOS app
without getting too verbose....i have been learning AS3 over the last week by building
I'm unable to use date (under OS X 10.6, using bash) without getting the
I'm getting a warning: Return makes pointer from integer without a cast for this
Without thinking about it too much, I've been doing something like the following: 1)
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
We would like to decrypt data stored in Microsoft Access. Without getting into too
I am trying to figure out how to declare my delegates without getting any
I understand recursive mutex allows mutex to be locked more than once without getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.