jquery dialog button

Posted by Nishima on Stack Overflow See other posts from Stack Overflow or by Nishima
Published on 2009-09-19T09:29:16Z Indexed on 2010/04/07 18:03 UTC
Read the original article Hit count: 320

Filed under:
|
|

Hi All,

Can anyone tell em how can call a function with parameters on a dialog and call that same function from somwhere else also.

function  showEditDialog(TagDivId, id, type, bFlag)

{ try { stickyinfo = new Array(); jQuery('#'+TagDivId).dialog({

    autoOpen: false,
    height : 535,
    width:320,
    modal: true,
    resizable:false,
    //closeOnEscape:false,

    buttons: {
        Cancel: function() {
            jQuery(this).dialog('close');
        },
        'OK': function showEditDialogOkFunc(id) {
			//stickyinfo.clear();
            //Register Collaboba Tag with the Server.
			var color = jQuery('#' + id).css('background-color');
			var tagid = document.getElementById(id);
			if(tagid != null)
			{
                GetTagInformation(id, stickyinfo); 
			}
			else
			{
				return false;
			}
             }
       }

            catch(e)
            {
           alert(e);
            }
   }

Is it ok the way i m calling showEditDialogOkFunc(id) and can i call this function from anywhere else.Since it's a dialog function will it get all the properies of the dialog defined above the ok function.And if i call the OK function from anuwhere else will it get all the properties of the dialog o not. Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about dialog