Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
03-21-2018, 02:31 PM | #1 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 45,806
|
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?
__________________
|
03-21-2018, 02:50 PM | #2 |
l8r
Industry Role:
Join Date: Oct 2002
Posts: 13,506
|
Something like:
Code:
<a id=mylink href="something.html" data-toggle="tooltip" title="" data-placement="top">Something</a> <script> a=<!--per_price_grp-->; b=10; c=a/b; mylink.title="$" +c.toFixed(2); </script> |
03-21-2018, 02:53 PM | #3 |
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,232
|
^^^ 5 stars and a for quick reply!
|
03-21-2018, 04:29 PM | #4 |
Industry Role:
Join Date: Mar 2003
Location: San Diego
Posts: 32,053
|
Nice, looks good!
__________________
|
03-22-2018, 05:38 AM | #5 | |
Yo Mamma!
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 19,925
|
Quote:
|
|
03-22-2018, 06:55 AM | #6 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 45,806
|
Thank you sir, that worked perfectly!
__________________
|
03-22-2018, 11:06 AM | #7 |
l8r
Industry Role:
Join Date: Oct 2002
Posts: 13,506
|
|