Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    jQuery Modal / Dialogue simple problem...pleas help!

    Hello,

    I currently have a jQuery modal dialogue that displays when a user selects to delete a user from the system. I need to add a seperate modal dialogue when a user tries and deletes something seperate from the system, for example a "title". Our system is a employee staffing application, which has users and user titles (ie Nurse).

    Here is the current code:

    Code:
    var List = {
    
    	getLocation : function(){
    		var url;
    		var re = new RegExp("/UserPanel/");
    
    		if (window.location.href.match(re)) {
    			url = '/Application/UserPanel';
    		}
    		else {
    			url = '/Application/ControlPanel';
    		}
    
    		return url;
    	},
    
    	bind : function(){	
    	
    		$("form[data-action='delete']").bind("submit", function(event){	
    			$("#dialog").dialog("destroy");
    			
    			var form = $(this)[0];
    			
    			event.preventDefault();
    			$("#dialog").attr("title","Confirm user deletion")
    			$("#dialog").html("Are you sure you want to permanently delete this user?");
    			$("#dialog").dialog({
    				
    				modal: true,
    			
    				buttons: {
    			
    				"Yes": function() {
    					form.submit();
    				},
    				
    				Cancel: function() {
    					$( this ).dialog( "close" );
    				}
    			}
    			
    			});		
    		
    		});
    	
    	},
    I need to add a seperate modal to show when a user clicks on a "form[data-action='delete']" button in the system.....

    how / where do I add that code to the .js!!??

    Any help!?!?

  • #2
    New to the CF scene
    Join Date
    Dec 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind, fixed!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •