Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Can someone help me here

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #153968
    alucard309
    Participant

    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

    #153970
    __
    Participant

    Can 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.

    #154005
    alucard309
    Participant

    If you don’t want to help just pick some flowers. Thanks

    Edited by mod

    #154021
    __
    Participant

    Why don’t you read the rest of my post before assuming I’m not helping?

    And, you’re welcome. : )

    #154035
    TheDoc
    Member

    @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.

    #154038
    alucard309
    Participant

    @TheDoc are you his lawyer now? I just wanted help from someone…. not anyone telling me how to be civil.

    Thanks

    #154040
    TheDoc
    Member

    @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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.