Home Forums General Issues mailto link javascript:void(0)


mailto link javascript:void(0)

  • Hi All, I trying to create a mailto: with a variable inside a WordPress page template
    The following code is a snippet from inside a loop “have_posts()”

    <?php $JobContact = get_field('job_contact'); ?>
    <h3>Primary Contact: <a href="mailto:<?php echo $JobContact; ?>"><?php echo $JobContact; ?></a></h3>

    I’m not sure if this is really an ACF issue, but I am getting a javascript:void(0) on the email link. I’ve tried using different field types (email & text), but doesn’t seem to make a difference. Has anyone come across this before?

    Here’s the staging site where this is happening:

    Thanks for any help.


  • If you’re behind a proxy, try disabling that (if you can).

    JavaScript Void(0) is often used when, inserting an expression into a web page may produce an unwanted side-effect.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘mailto link javascript:void(0)’ is closed to new replies.