View Single Post
Old 10-06-2012, 06:35 PM   PM User | #1
sanidhya09
New to the CF scene

 
Join Date: Sep 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
sanidhya09 is an unknown quantity at this point
Netscape How to execute two javascript function efficiently

Whenever i am pressing delete button with two function calls, only one deleteRow() function get executed. But if i use only one deleteme() function on the button click it works fine. Whereas i want to use both the function.

Code:
<script type="text/javascript">  
         function deleteme(id){  
            if(confirm('Confirm Deletion')){  
            var f=document.form763;  
            f.method="post";  
            f.action='department_delete.jsp?id='+id;  
            f.submit;    
            } else {//window.location.reload("Department.jsp");  
            }  
            }   
  
            function deleteRow(id){  
            document.getElementById("tableborder3").deleteRow(id);  
            }  
 </script>   
<td>  
         <input type="submit" name="b1" value="Delete" onClick="deleteme(<%= rs.getString("department_id") %>);deleteRow(<%=rs.getRow()%>);" />  
 </td>
sanidhya09 is offline   Reply With Quote