views:

1332

answers:

2

Hi,

How do I disable the redirect in Facebook's invite form?

<fb:serverfbml style="width: 600px; height: 650px;">
        <script type="text/fbml">
            <fb:request-form 
                action="index.php"
                method="POST"
                invite="true"
                type="MyApp"
                content="Please have a look. 
        <fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' />">                
    <div class="clearfix" style="padding-bottom: 10px;">
        <fb:multi-friend-selector condensed="true" style="width: 600px;" />
    </div>
    <fb:request-form-submit />
</fb:request-form>

After selecting friends, you will see the final Send Invite dialog with your template. After you click send or cancel, how do i disable the redirect by just closing the the dialog?

Thanks.

A: 

Can you just blank out or remove the action parameter of the form?

Tesserex
nope, that will just redirect to your provide inside the iframe that was housing the form. :(
Colossal Paul
A: 

I can't get this work too, but someone in the facebook developer forum seems solved it:

<script>
function callback()
{
// do whatever
}
</script>

<fb:request-form action="javascript:callback()" >
</fb:request-form>

http://forum.developers.facebook.com/viewtopic.php?pid=213360

(this does not work for me....)

even tried withjavascript:alert('test')doesn't work either
Aykut
btw alert doesn't work in fbml page