• Hi,

    I use the shortcode cfdb-html to show different rows on http://pre.trustedmusic.de/auftraege/. The code is:

    <p style="text-align: center;">[cfdb-html form="Schwarzes Brett Anfrage" role="Anyone" filter="category~~/.*$_POST(category).*/i" permissionmsg="false" hide="Submitted Login,Submitted From, Submitted"]</p>
    
    <div class="border-brett2">
    <div class="inner-border-brett">
    <div>
    <div class="icon-brett inner-border-img" style="text-align: left;"><img class="icon-brett" src="${image_url}" alt="Kategorie" align="middle" />
    <center class="category-icon-brett">${category}</center></div>
    </div>
    <div class="h3-brett" style="text-align: left;"><strong>Schwerpunkt/Anlass: </strong></div>
    <div class="h5-brett" style="text-align: left;">${subject}</div>
    <div class="h3-brett" style="text-align: left;"><strong>Auftraggeber:</strong></div>
    <div class="h5-brett" style="text-align: left;">${your-name}</div>
    <div class="h3-brett" style="text-align: left;"><strong>Beschreibung:</strong></div>
    <div class="h5-brett" style="text-align: left;">${your-message}</div>
    <div id="sampleDownload">
    <div class="h3-brett" style="text-align: left;"><strong>Datei:</strong></div>
    <div class="h5-brett" style="text-align: left;"><a href="http://${multifile-791}" target="_blank">Sample herunterladen</a></div>
    </div>
    <div class="h5-brett" style="text-align: center;"><a href="http://pre.trustedmusic.de/meine-nachrichten/?fepaction=newmessage&to=${your-email}" target="_blank"><input id="submit" class="submit button-smartphone" name="submit" type="submit" value="Nachricht schreiben" /></a></div>
    </div>
    </div>
    <p style="text-align: center;">[/cfdb-html]</p>

    At the end of each row is a download link named “Sample herunterladen”. If the URL of the download link contains only http:// I want to hide the link.

    I tried this through javacript:

    <script type="text/javascript">
    var divs = document.getElementById("sampleDownload");
        divs.style.visibility = "hidden";
        divs.style.display = "none";
    </script>

    It only hides the download link in the first row. All other rows are still visible.

    How can I hide the links in all rows if URL contains only http://?

    Thanks,
    Simon

The topic ‘Javascript in cfdb-html shortcode’ is closed to new replies.