我正在尝试验证来自我嵌入的多朋友选择器的输入,如下所示:
<fb:serverFbml>
<script type="text/fbml">
<form action="http://example.com/testSubmit.php" method="POST" onsubmit="return validate(this);">
<fb:multi-friend-input name="hidden"/>
<input type="submit" value="Submit"/>
</form>
</script>
</fb:serverFbml>
正如预期的那样,当在 iframe 中呈现时,onsubmit 函数前面带有我的 appid。我假设我需要将我的 javascript 嵌入 iframe 中的某个位置,以便我的 validate() 函数的定义也可以在我的 appid 之前添加。
但是,我没有任何运气这样做。我尝试过多种方式将其嵌入 js,但没有成功。
谢谢!