View Single Post
Old 03-21-2018, 02:31 PM  
2MuchMark
Videochat Solutions
 
2MuchMark's Avatar
 
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 49,412
Question for HTML Guru's

How-do! I have a question.

I want to have an a href with a title that is a variable from a javascript.

For example

<a href = "something.html" title="Variable number">Click</a>

Here's my code:

<a href="something.html" data-toggle="tooltip" title="

<script>
a=<!--per_price_grp-->;
b=10;
c=a/b;
document.write("$" +c.toFixed(2));
</script>


" data-placement="top">


But instead of showing the value of the script, it's showing most of the code.

Suggestions?
__________________

Custom Coding | Videochat Solutions | Age Verification | IT Help & Support
www.2Much.net
2MuchMark is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote