How can I use html:link to run only a JavaScript function?

Posted on 2009-02-18
Last Modified: 2012-05-06
I am trying to hide a div "chunk" using an html-el:link tag but its not working.  I'm setting the page attribute equal to the page in which the div is located.  I'm just getting a "page not found" error.  Can someone tell me how to hide the div section using the link without getting the error page?

Thanks to all of you good souls!
function hideCriteriaSubTotals() {






<html-el:link page="/jsp/pendingTotalsReport.jsp" onclick="hideCriteriaSubTotals();" >

       Hide Criteria Subtotals


<div id="criteriaSubtotals">		

       CriteriaSubtotal goes here.			


Open in new window

Question by:jwright9
    LVL 28

    Accepted Solution

    Have you tried


    Or even plain HTML (I know that is very hard)

    <a href="#" onclick="hideCriteriaSubTotals();">

    Author Comment

    Thanks!  I found that
    <html-el:link href="javascript:hideCriteriaSubTotals();">
       Hide Criteria Subtotals

    Thanks for the alternative answer sybe!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now