function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suresh RaghuramSuresh Raghuram 

onclick in command link not working

Hi Community,

Can any body say me where I am making the mistake. onclcik is working upto closing the popup. but the alert is not showing up.

<apex:commandLink onclick="closePopup();alert(ok);" onmouseover="openPopup('{!ag.agreement.Id}');" onmouseout="closePopup();"> {!ag.agreement.Name}</apex:commandLink>

thanks,
Suree
hitesh90hitesh90
Hello suree,

You have to give alert message in single quote. like alert('ok');

see below:

<apex:commandLink onclick="closePopup();alert('ok');" onmouseover="openPopup('{!ag.agreement.Id}');" onmouseout="closePopup();"> {!ag.agreement.Name}</apex:commandLink>


Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
Email :- hiteshpatel.aspl@gmail.com
My Blog:- http://mrjavascript.blogspot.in/
AmitAmit (Salesforce Developers) 
Please refer following links for more information : https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_commandButton.htm http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm   http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm