facebook friend selector not appearing/does not load? - facebook

I am using the below mentioned code to show a friend-selector list, but it's not loading anymore. It used to work some time back.
It does show that it's loading with the typical facebook style ajax loading animation and after some time nothing happens. Only the button appears, but not the input field in which user can type the friends name. What do I need to do to make the input field appear?
<fb:fbml>
<form action="submit.php" id="testForm" method="post">
<fb:friend-selector name="uid" idname="ids"></fb:friend-selector>
<input name="submit" type="submit" value="Add" class="inputbutton" />
</form>
</fb:fbml>

FBML is deprecated. Try using the current API and see if that fixes your issue.

Related

Form Action Page Not Found

I am playing around a bit with Perl and auto-filling out forms. However, when I view the source code and paste the "action" URL of a form into my browser, it goes to a "Page Not Found". How could this be? If data is able to be submitted to a page then wouldn't the page have to exist? Or am i just missing something?
For instance, the HTML looks like:
<form action="/Pages/somepage">
<input type="text" name="email" />
<input type="submit" />
</form>
So if i go to http://thewebserver.com/formPage/Pages/somepage it simply displays a "Page Not Found" error.
Thanks.
If the form action is "/Pages/somepage", then the correct full URL will be http://thewebserver.com/Pages/somepage, not http://thewebserver.com/formPage/Pages/somepage. Not sure where you got that "formPage" from.

Why does my form not upload files in Internet Explorer 9?

Welcome to episode 32,342,343 of "Why does Internet Explorer Suck So Much?"...
I've seen lots of reports that IE9 does a crappy job uploading files. Apparently it has lots of caveats about when it will or won't work (If someone has a definitive list I'd love to see it). However, most of the problems/solutions I see have found are related to javascript, usually the jQuery form plugin or something similar.
My form is not submitted via AJAX and the the file input field is not hidden or obscured with css. Yet, I get several support tickets per day from users on IE9 trying to submit the form and "nothing happens" (=the form submits. No errors, but the file is not uploaded.) I haven't gotten a single complaint with a different browser, and IE8 even seems to work (as well as it ever does).
Here's the top of my form. Am I missing something?
<form action="http://mysite.dev/account-settings/?open=resume" method="post" class="wpjb-form" enctype="multipart/form-data">
<input type="hidden" name="resume_form" value="resume_form" />
<fieldset class="wpjb-fieldset-default">
<input id="firstname" name="firstname" type="hidden" class="regular-text " value="John" />
<input id="lastname" name="lastname" type="hidden" class="regular-text " value="Henry" />
<input id="email" name="email" type="hidden" class="regular-text " value="john.henry#johnhenry.com" />
<div class="wpjb-element-input-checkbox wpjb-element-name-is_active">
<label class="wpjb-label">Show resume? </label>
<div class="wpjb-field">
<label for="is_active_1"><input type="checkbox" class="" name="is_active" id="is_active_1" value="1" checked="checked" /> Yes <small style="display:inline;">(Uncheck to hide your resume)</small></label>
</div>
</div>
<div class="wpjb-element-input-select-one wpjb-element-name-file">
<label class="wpjb-label">Upload a <i>new</i> resume file</label>
<div class="wpjb-field">
<input style="line-height:1em;" id="file" name="file" type="file" class="regular-text " />
<small class="wpjb-hint">Accepted file types: doc, docx, odf, pdf, rtf</small>
</div>
</div>
</fieldset>
...
It goes on like this with a couple more <fieldset>s then ends like this:
....
<p class="submit">
<input type="submit" name="Submit" id="wpjb_submit" value="Save Changes" />
</p>
</form>
Update
I'm happy for everyone who has never experienced this problem but it's not just me:
http://answers.microsoft.com/en-us/ie/forum/ie9-windows_vista/cannot-upload-files-using-internet-explorer-9/5724d921-ae71-e011-8dfc-68b599b31bf5
Update2
I'm seeing a lot of suggestions to add a meta tag to force the user agent to IE8...
<meta http-equiv="X-UA-Compatible" content="IE=8" />
I don't want to do this because although I do support IE8, many of the elements on my site render differently in IE8 vs. IE9. This would create a rather sloppy user experience as any IE users would experience I temporary "time warp" back to IE8 on that specific page.
I was able to fix this nightmare of a problem by wrapping a jQuery form submit in a setTimeout:
$('#complete_profile input[type="submit"]').click(function(){
setTimeout(function() {
$('#complete_profile form').submit();
}, 0);
});
This may cause duplicate submission when the form DOES submit, however, so be careful.
As Graham does, I think that this might more be a server issue - also I have never had issues with fileuploads in IE9 (or newer) - I guess you don't want to post the code of the PHP Script that handles the upload?
if any data is not being sent, You could check the post data by your hidden input on your server side script. For example if you're using php it would be something like
<? if($_POST['resume_form']=='resume_form'){
//Do something
} ?>
Or you could also use meta compatible tags for IE to render the page like IE8
<meta http-equiv="X-UA-Compatible" content="IE=8" />
I suggest setting the X-UA-Compatible meta tag value and seeing whether that makes any difference.
See this question for possible values: What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?
It may also be that the page is triggering a non-standards mode in IE9. I suggest opening the page in IE9, opening the developer tools, and seeing which browser/document modes are selected. That may give you a clue. Note that the "enctype" form attribute was not supported prior to IE8, so if the browser is using an older doc mode, that attribute is not being recognized.
OK I'd rather leave a comment not an answer but I don't have the points for that yet!
Are the users in quirks mode? Most IE users are unaware of the quirks mode and may have accidentally clicked it when trying to refresh the page (instead of pressing F5). If it is intermittent this could be the reason why.
following on from above.. On the server side how are you checking for empty fields? I'm more on the lines of JS here where you often look for "", null and undefined I'm just thinking that perhaps the quirks mode is sending some fuzzy data that your server side error checking is missing because you aren't looking for it and hence reports all is OK.

PHPSESSID appears in form arbitrarily

I have a login form written in PHP and each time I start the browser and go to the respective page, the first field of the form is this:
<input type="hidden" name="PHPSESSID" value="session_id_code" />
If I close the window, but I don't restart the browser, this doesn't happen. Any idea what's happening and why?
Thanks!
Form's code:
<?php
if (condition) {
?>
<form method="post" action="">
<dl>
<dt>Email:</dt>
<dd><input type="text" name="useremail" /></dd>
<dt>Password:</dt>
<dd>
<input type="password" name="userpass" /></dd>
<dt class="dt-buttons"><input type="submit" name="button_login" value="Login" class="button" /></dt>
</dl>
<input type="hidden" name="formkey" id="formkey" value="224ca00155w2fcda8906e1e40af03a71" />
</form>
<?php
}
?>
The form is simple HTML and is not dynamically generated.
EDIT2:
As I was saying, when I access the page for the first time after I started the browser, this thing happens. If I refresh the page afterwards, the hidden field doesn't show up.
Is it possible to have something to do with the SSL certificate? And if yes, why some pages/forms behave like this and some don't?
Sounds like you've got trans_sid enabled (transparent session id). Using trans_sid can be a security issue, especially if your site links to external content, or you allow link sharing - it lets a user's session ID leak out as part of the URL, meaning the session is highly vulnerable to hijacking.

FBML document.getElementById(‘’).setTextValue issue

I just added a FBML application to my fan page but I can't make JS to work ... though I read the FBJS best practices ... I guess I am missing something.
here is the current code :
<form action="" method="post" target="_blank">
<input type="text" name="email" id="emailInput" onclick="document.getElementById(‘emailInput’).setTextValue(‘Hi!’);" value="votre adresse email" alt="Entrez votre email" />
<input type="hidden" name="place" value="facebook" />
<br/>
<input type="submit" name="submit" class="submitInput" value="" alt="Valider" />
</form>
The onclick event seems not to work but I can't get any answers from my research over Internet ...
Any help welcome ;)
Cheers guys.
Gotye.
Use Firebug or Chrome tools to verify that the id is actually emailInput, and that the Facebook FBML parser didn't append a prefix to the ID. But FBML pages have been deprecated so you will be better off switching to an iframe fan page so you aren't running the risk of having Facebook kill your FBML fan page. Also, javascript is a ton easier in iframe pages and can be called without having to wait for a click event to fire.

iframe post-form using fb:friendselector passing values

I am trying to build an facebook-iframe application, where you can select friends to send them some information.
So i build a form method="post", put in some input fields, and a friend selector.
The fb:friend input field is renderd .. works fine.. but it doesn't pass over the selected friends.
Do i have to fix it by javascript?
Is there a simpler solution?
thx sven
Code:
<form action="http://xxx.net/index.php" method="post" target="_top">
<input id="sometext" name="sometext" type="text" size="30" maxlength="30">
<br/>
<fb:serverFbml>
<script type="text/fbml">
<fb:fbml>
<fb:friend-selector uid="$user" name="$user" idname="friendselector"/>
</fb:fbml>
</script>
</fb:serverFbml><input type="submit" name="submit" value="Send">
</form>
Actually, to my knowledge you can't fix it with Javascript.
I need more details (!), but it sounds like you may be attempting to use the FBML implementation of fb-friend-selector, without fb-request-form.
If so, try this: https://developers.facebook.com/docs/reference/fbml/request-form/
(!) Can you post your HTML code here? It's likely an implementation issue that we can figure out through your code.
Ok, i am not alone, so here is an other way to cope with it.
Facebook-like styled Multifriendselector.
http://mike.brevoort.com/2010/08/10/introducing-the-jquery-facebook-multi-friend-selector-plugin/