John Doe
John Doe

Reputation: 3671

Why does the XFBML registration plugin go blank when used in IE?

I think I might be doing something wrong. Users that try and register with Internet Explorer say that the facebook plugin goes blank when trying to submit it. Any Ideas?

This is some of 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

Upvotes: 3

Views: 612

Answers (2)

Vestride
Vestride

Reputation: 3539

I believe your problem is this bug, which Facebook says they fixed yesterday, although I have not tested it to see if it is fixed.

We believe this issue may be resolved. Please make sure this line is in the validation function: errors = {};

If you're still seeing issues, can you please test example function on https://developers.facebook.com/docs/plugins/registration/advanced/

And reopen with a link to an example if it does not work.

Upvotes: 0

crockpotveggies
crockpotveggies

Reputation: 13300

If you're using XHTML the most common problem is that the Facebook namespace isn't included in the HTML tag. This is the normal reason IE doesn't render FBML.

Your HTML tag will look like:

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

This is part of the Legacy API.

Upvotes: 2

Related Questions