• Hello all,

    I’m not a very savvy programmer – amateur at best.

    My site runs the WP-Avatar theme, and I’m trying to implement this functionality that when a user click on a button on this specific page, a JavaScript alert box pops-up prompting them of something. Once they click Ok, the button would redirect them to another page.

    I have toiled on this for hours, but still can’t get it to work.

    I would be incredibly grateful if someone can extend a helping hand.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Ok, you’re using a button right? as in… <input type=”submit”… or <button>My Button</button>

    To either one you could add onClick=”javascript: alert(‘The content here’);” But that may not be exactly what you’re looking for.

    <input type=”submit” onClick=”javascript: alert(‘The content here’);” />

    <button onClick=”javascript: alert(‘The content here’);”>My Button</button>

    or there are various other ways to do it depending exactly on your needs.

Viewing 1 replies (of 1 total)
  • The topic ‘Javascript Alert Button’ is closed to new replies.