Procesar formulario desde facebook fan page


/ Published in: jQuery
Save to your folder(s)

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.


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. function do_submit(formname, posturl, rewriteid) {
  3. div_id = document.getElementById(rewriteid);
  4. form = document.getElementById("form_concurso");
  5. ajax = new Ajax();
  6. ajax.responseType = Ajax.FBML;
  7. ajax.requireLogin = true;
  8. ajax.ondone = function(data) {
  9. div_id.setInnerFBML(data);
  10. }
  11. formdata = form.serialize();
  12. ajax.post(posturl, formdata);
  13. }
  14. </script>
  15.  
  16. <link rel="stylesheet" type="text/css" href="http://www.larueprivee.com/facebook/fan_page/estilos.css?v=1.0" />
  17.  
  18. <div id="fb_concurso">
  19. <form name="form_concurso" id="form_concurso" method="post" action="http://www.larueprivee.com/concurso.php">
  20. <div style="float:right; width:352px; overflow: hidden;">
  21. <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;" />
  22. <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;" />
  23.  
  24. </div>
  25. </form>
  26. </div>
  27.  
  28. <div id="ajaxMessage">--</div>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.