<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>AJAX</Title>
      <Author>Zonaro, Carvalho</Author>
      <Description>Cria uma snippet AJAX</Description>
      <HelpUrl>http://misasi.com.br</HelpUrl>
      <SnippetTypes />
      <Keywords />
      <Shortcut>ajax</Shortcut>
    </Header>
    <Snippet>
      <References />
      <Imports />
      <Declarations>
        <Literal Editable="true">
          <ID>acao=</ID>
          <Type></Type>
          <ToolTip></ToolTip>
          <Default>acao=</Default>
          <Function></Function>
        </Literal>
      </Declarations>
      <Code Language="JavaScript" Kind="type decl" Delimiter="$"><![CDATA[$$.ajax({
        type: 'GET',
		url:location.pathname,
        async: true,
        data: "$acao=$",
        success: function (data) {
            console.log(data)
        },
        error: function(xhr, status, error) {
  			var err = eval("(" + xhr.responseText + ")");
  			alert("Erro: " + err.Message);
    	},
        beforeSend: function () {
           console.log("comecou")
        },
        complete: function () {
			console.log("acabou")
        }
});]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>