mobileFX WebKitX ActiveX
WebKitX JavaScript Externs~-_namespace / ShowSaveFileDialog Method
Title of the dialog window.
Absolute path of the initial folder.
File filters, pipe separated values in form: "All Files|*.*|Image Files|*.png;*.jpeg"
Proposed file name that can be edited by user.
In This Topic
    ShowSaveFileDialog Method
    In This Topic
    ShowSaveFileDialog, show Windows default File Save dialog.
    Syntax
    var value; // Type: string
    
    // Parameters
    var DialogTitle; // Type:  string
    var Path; // Type:  string
    var Filters; // Type:  string
    var Filename; // Type:  string
    
    value = ShowSaveFileDialog(DialogTitle, Path, Filters, Filename);
    function ShowSaveFileDialog( 
       DialogTitle : string,
       Path : string,
       Filters : string,
       Filename : string
    ) : string;

    Parameters

    DialogTitle
    Title of the dialog window.
    Path
    Absolute path of the initial folder.
    Filters
    File filters, pipe separated values in form: "All Files|*.*|Image Files|*.png;*.jpeg"
    Filename
    Proposed file name that can be edited by user.
    Example
    function OnDesignerSaveFormAs(e, no_dialog)
    {
    	var title = "Save WebForm";
    	var path = APP_PATH;
    	var filename = WEB_FORM.filename || WEB_FORM[$NAME] + ".json";
    	var filter = "WebForm JSON File|*.json|All Files|*.*";
    
    	if (!filename || no_dialog == undefined)
    	{
    		filename = ShowSaveFileDialog(title, path, filter, filename);
    	}
    
    	if (filename) 
    	{
    		EditorReadCurrentViewState();
    
    		var FORM = {
    			
    			CONTROLS: [],
    			
    			CLIENT_TIER_SCRIPT: CLIENT_TIER.model.getValue(),
    			CLIENT_BREAKPOINTS: EditorGetModelBreakPoints(CLIENT_TIER.model),
    			CLIENT_TIER_VIEW: CLIENT_TIER.viewstate,
    
    			SERVER_TIER_SCRIPT: SERVER_TIER.model.getValue(),			
    			SERVER_BREAKPOINTS: EditorGetModelBreakPoints(SERVER_TIER.model),
    			SERVER_TIER_VIEW: SERVER_TIER.viewstate,
    
    			SQL_STATEMENTS: db_statements(),
    			W2_CONTROL_INDEX: W2_CONTROL_INDEX,
    		};
    
    		FORM.CONTROLS = w2ui_webform_controls();
    		var json = JSON.stringify(FORM, null, "\t");
    		WriteTextFile(filename, json, "utf-8");
    		WEB_FORM.filename = filename;
    		
    		$("#x-w2ui-menu-save-as").w2tag({			
    			html: "Saved " + filename,
    			hideOnKeyPress: true,
    			hideOnBlur: true, 
    			hideOnClick: true,
    		});
    	}
    }
    Browser Compatibility
    80