<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Amigos,</FONT></DIV>
<DIV><FONT face=Arial size=2>Eu já tinha indicado o Content-Type</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vejam:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>.HTML</FONT></DIV>
<DIV>&lt;html&gt;<BR>&lt;body onload="javascript:ajax();"&gt;<BR>&lt;div 
id="bloco_ajax"&gt;&lt;/div&gt;<BR>&lt;/body&gt;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>.PL</FONT></DIV>
<DIV><FONT face=Arial size=2>#!/usr/bin/perl</FONT></DIV>
<DIV><FONT face=Arial size=2>print "Content-type:text/html\n\n";</FONT></DIV>
<DIV><FONT face=Arial size=2>print "texto 
em&lt;b&gt;negrito&lt;/b&gt;";exit;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>E&nbsp;mesmo assim a tag volta escrita literalmente 
na tela e não é renderizada pelo browser.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Não consigo entender o porquê.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>[]s,</FONT></DIV>
<DIV><FONT face=Arial size=2>Fernando</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=fabriciostuff@gmail.com 
  href="mailto:fabriciostuff@gmail.com">Fabricio Veiga</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cascavel-pm@pm.org 
  href="mailto:cascavel-pm@pm.org">Cascavel Perl Mongers</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, August 01, 2008 12:14 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cascavel-pm] ajax básico + 
  perl</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr>Achei: <A 
  href="http://www.pageresource.com/cgirec/ptut4.htm">http://www.pageresource.com/cgirec/ptut4.htm</A><BR><BR>#!/usr/bin/perl<BR><BR>$retorno 
  = "Content-type: 
  text/html\n\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &lt;br&gt;Negritro&lt;b&gt;";<BR><BR>print 
  $retorno;<BR><BR>&nbsp;<BR><BR>T+<BR><BR>
  <DIV class=gmail_quote>2008/8/1 Fabricio Veiga <SPAN dir=ltr>&lt;<A 
  href="mailto:fabriciostuff@gmail.com">fabriciostuff@gmail.com</A>&gt;</SPAN><BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV dir=ltr>Boa noite Fernando.<BR><BR>Seu retorno do AJAX está sendo aloca 
    em alguma DIV ou outro elemento html? <BR>Eu uso AJAX mas com PHP e o 
    retorno vem com formato HTML. Um 
    exemplo:<BR><BR>HTML<BR>&lt;html&gt;<BR>&lt;body 
    onLoad="javascript:testeComAjax();"&gt;<BR>&lt;div 
    id="retornoAjax"&gt;&lt;/div&gt;<BR>&lt;/body&gt;<BR><BR>no 
    PHP..<BR><BR>&lt;?php<BR>echo 
    "&lt;b&gt;Negrito&lt;/b&gt;";<BR>?&gt;<BR><BR>A função testeComAjax() chama 
    o request GET do script em PHP, retornando o 
    "&lt;b&gt;Negrito&lt;/b&gt;".<BR>Acredito no seu script em Perl, ajax.pl, 
    tenha que definir antes de dar o comando print, o type do conteúdo, aquele 
    Content-type ... Eu não lembro agora como é o Content-Type para retornar com 
    formato HTML. Dá uma pesquisa no Google... 
    blz?<BR><BR>Abraços..<BR><BR>Fabrício Veiga.<BR><BR><BR>
    <DIV class=gmail_quote>
    <DIV class=Ih2E3d>2008/7/31 <SPAN dir=ltr>&lt;<A 
    href="mailto:fernandolouis@terra.com.br" 
    target=_blank>fernandolouis@terra.com.br</A>&gt;</SPAN><BR></DIV>
    <BLOCKQUOTE class=gmail_quote 
    style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Pessoal, 
      sou iniciante em AJAX...
      <DIV>
      <DIV></DIV>
      <DIV class=Wj3C7c><BR><BR>Uma pergunta bem básica:<BR><BR>Pq o AJAX 
      retorna o texto sem formatação html?<BR><BR>Por exemplo,<BR><BR>tenho a 
      minha pagina.html, que via ajax chama o ajax.pl<BR><BR>então o ajax.pl 
      retorna:<BR><BR>print "texto em &lt;b&gt;negrinho&lt;/b&gt;";<BR><BR>só 
      que o "negrinto" não retorna em negrito na página.html, pois as tags não 
      são processadas e retorna o texto inteiro: "texto em 
      &lt;b&gt;negrinho&lt;/b&gt;"<BR><BR>pq? como retornar o texto 
      formatado?<BR><BR>[]s,<BR>Fernando 
      <BR>_______________________________________________<BR>Cascavel-pm mailing 
      list<BR><A href="mailto:Cascavel-pm@pm.org" 
      target=_blank>Cascavel-pm@pm.org</A><BR><A 
      href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
      target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV><BR></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Cascavel-pm mailing 
  list<BR>Cascavel-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/cascavel-pm</BLOCKQUOTE></BODY></HTML>