I'm trying to create a FAQ section on my Force.com site that queries our org's Solution object and dynamically display Solution titles as links via commandLinks. I want to display a pop up modal that presents the Solution record's contents via javascript and CSS.
I created an openMod() javascript function to do just that. However, I that when the button is clicked, it initiates the modal, then submits the page as a form.
Is it possible to disable the form submission from my commandLink? I've look at other markups such as outputLink, but I wasn't able to prevent the default events. I just want my link to initiate JS code with SFDC variables passed in.
Thanks!!
<apex:repeat value="{!solution}" var="sol" >
<p>
<apex:commandLink onclick = "openMod('{!sol.SolutionName}', '{!sol.SolutionNote}')" value="{!sol.SolutionName}"/>
</p>
</apex:repeat>