Javascript and jquery stop event

qcastljff

New Member
I have a small issue:I have a jquery onclick event set for a row() in a table and in the last column I have a link that opens a confirmation pop-up(asking if I am sure to do that bla bla . . .). If I click the link, the pop-up opens, and if I press no, it should stay on the current page, but instead it continues with the event from the row(that click is triggered). What do you think?Link:\[code\]<tr class="clickableRow" id="someId"> bgcolor="color"> .......... <td> <a href="javascript:void(0)" onClick="javascript:del_prompt('url');"> <img src="http://stackoverflow.com/questions/15702726/images/delete.png" border="0"></a></td></tr>\[/code\]Javascript:\[code\] $(".clickableRow").click(function() { window.open("companynewestimate.php?id="+this.id,"_parent"); });\[/code\]Del function\[code\]<script language="javascript">function del_prompt(id){ if(confirm ("Are you sure you want to delete selected Record")){ location.href = "http://stackoverflow.com/questions/15702726/companyopenestimates.php?act=del&id="+id; } else{ return false; } }</script>\[/code\]
 
Back
Top