In jsp confirm logout

in struts  application i have a  link "Logout".. After click on the hyper link...  i  want to take confirmation..

 i used javascript

<a href="<%=request.getContextPath()%>/" target="main" class="leftnav"  onClick="conform("Are you sure you want to Logout??);">Logout</a>

but it is  ls loging out  in both cases  Yes/Cancle......

please help me...

Who is Participating?

Improve company productivity with a Business Account.Sign Up

devicConnect With a Mentor Commented:
<a href="<%=request.getContextPath()%>/" target="main" class="leftnav"  onClick="return confirm('Are you sure you want to Logout??');">Logout</a>
hi hariprasadb,
are you not satisfied with the answer?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.