Why is the XFBML registration plugin empty when used in IE?

I think I can do something wrong. Users trying to register with Internet Explorer say the facebook plugin is empty trying to submit it. Any ideas?

This is the code:

    <fb:registration redirect-uri="http://friendsconnect.org/----.php" 
fields='[{"name":"name"},{"name":"first_name"},{"name":"last_name"},{"name":"email"},{"name":"username","description":"Username","type":"text"},{"name":"password"},{"name":"gender"},{"name":"birthday"},{"name":"captcha"},]'
 onvalidate="validate"></fb:registration> 

<script> 
function validate(form) {
  errors = {};
  if (form.name == "") {
    errors.name = "Please enter your name.";
  }
    if (form.username == "") {
    errors.username = "Please enter your username.";
  }
  if (form.email == "") {
    errors.email = "Please enter your email address.";
  }
  if (form.password == "") {
    errors.password = "Please enter your password.";
  }
  if (form.gender == "") {
    errors.gender = "Please enter your sex.";
  }
  if (form.birthday == "") {
    errors.birthday = "Please enter your birthday.";
  }
  if (form.captcha == "") {
    errors.captcha = "Try and enter the text in the box below.";
  }
  return errors;
}
</script>

enter image description here

+3
source share
2 answers

If you use XHTML, the most common problem is that the Facebook namespace is not included in the HTML tag. This is a common reason why IE does not display FBML.

Your HTML tag will look like this:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">

This is part of the Legacy API.

+2
source

, , , Facebook, , , , .

, . , : errors = {};

, , https://developers.facebook.com/docs/plugins/registration/advanced/

.

0

All Articles