Using ExecCommand with custom commands

  •  02-23-2007, 4:35 AM

    Using ExecCommand with custom commands

    Is it possible to use the javascript ExecCommand to cause a postback with a command other than one of the predefined commands?
     
    I have created a new command button SaveAndExit that causes a postback. I did this by simply adding it to the .config file. This works as expected, but I now want to call this custom command using ExecCommand from javascript but keep getting an error saying the command is not defined or supported. Is this actually possible, if not can you suggest an alternative?
     
    As background I am trying to force a save when a browser window closes, but I must distinguish between Save and SaveAndExit so cannot use ExecCommand("Save").
     
    Regards
    Colin
View Complete Thread