Home › Forums › JavaScript › Can someone help me here
- This topic is empty.
-
AuthorPosts
-
October 24, 2013 at 1:46 pm #153968alucard309Participant
Hello Everyone!!!!
Ok so this is what I am trying to do. I want to make a page similar to http://whatthefuckhasobamadonesofar.com/ where I have different “Questions” coming in and out and I want to include the answers of each question in a javascript alert box. I am having trouble debugging it.
So how can I show only the variable value in a javascript alert?
Here is the line I have been dealing with:
<div><a href="{{footnote}}">{{footnote}}</a></div>
I was trying this:
<div><a href=javascript:alert("{{footnote}}");>{{footnote}}</a></div>
But nothing works!!!!!! Can someone help me with this? Thanks
October 24, 2013 at 1:59 pm #153970__ParticipantCan someone HELP ME here!!!!!!!!!!!!
nope, can’t help. Add a few more exclamation points, and make sure you capitalize everything. That should get you some help.
</sarcasm>
Please don’t take offense. I’m just being snarky.
So how can I show only the variable value in a javascript alert?
<a href=javascript:alert("{{footnote}}");>{{footnote}}</a>
"{{footnote}}"
is a string, not a variable.Are you trying to use Angular (that looks like the ng data binding syntax)? or are you using some templating language?
Either way (or even if it’s something else), you’ll need to find where the value-in-question is actually defined (and assigned to a var). It would be helpful if you showed us the code (e.g., on codepen), as well.
October 25, 2013 at 5:55 am #154005alucard309ParticipantIf you don’t want to help just pick some flowers. Thanks
Edited by mod
October 25, 2013 at 7:47 am #154021__ParticipantWhy don’t you read the rest of my post before assuming I’m not helping?
And, you’re welcome. : )
October 25, 2013 at 10:14 am #154035TheDocMember@alucard309 – you’ll see that @traq actually did provide valuable information in his post. He even admitted to disregard his snarky comment. C’mon, let’s try to be civil.
October 25, 2013 at 10:18 am #154038alucard309Participant@TheDoc are you his lawyer now? I just wanted help from someone…. not anyone telling me how to be civil.
Thanks
October 25, 2013 at 10:34 am #154040TheDocMember@alucard309, /sigh. No, I’m a moderator of the forum trying to make sure everything runs smoothly. Again, please look at @traq’s advice and his request to see more code so that he can help you.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.