Return to Snippet

Revision: 38062
at December 23, 2010 23:49 by estadoactivo


Initial Code
<script type="text/javascript">
function do_submit(formname, posturl, rewriteid) {
	div_id = document.getElementById(rewriteid);
	form = document.getElementById("form_concurso");
	ajax = new Ajax();
	ajax.responseType = Ajax.FBML;
	ajax.requireLogin = true;
	ajax.ondone = function(data) {
		div_id.setInnerFBML(data);
	}
	formdata = form.serialize();
	ajax.post(posturl, formdata);
}
</script>

<link rel="stylesheet" type="text/css" href="http://www.larueprivee.com/facebook/fan_page/estilos.css?v=1.0" />

<div id="fb_concurso">
<form name="form_concurso" id="form_concurso" method="post" action="http://www.larueprivee.com/concurso.php">
<div style="float:right; 	width:352px;	overflow: hidden;">
<input type="text" name="correo" id="correo" maxlength="58" style="width: 220px; font-family: Arial, Helvetica, sans-serif; font-size: 1.8em;	margin-top: 23px;	border: 0; border: none;	color: #f397b1; float: left;	margin-right: 4px;	background: #f7eea1;" />
<input type="button" style="width: 89px; height: 34px;	float: left; border: 0; border: none; text-indent: -9999px; background: url(http://www.larueprivee.com/facebook/fan_page/btn-enviar.gif) no-repeat; margin-top:18px; cursor: pointer;" value=" " onclick="do_submit('form_concurso','http://www.larueprivee.com/concurso.php', 'ajaxMessage'); return false;" />

</div>
</form>
</div>

<div id="ajaxMessage">--</div>

Initial URL


Initial Description
No entiendo xq no procesa esta formulario...? si en lugar de hacer un ajax.post hacemos un div_id.setInnerFBML(formdata); No printa en ajaxMessage nada, lo deja en blanco.

Initial Title
Procesar formulario desde facebook fan page

Initial Tags
php, jquery

Initial Language
jQuery