kamilo37
01-09-2010, 06:08 AM
Hi. I'm trying to figure out how a form I ran across dynamically populates its function with parameters.
I've been trying to figure it out by looking at the example on this page (http://www.somethingtoputhere.com/therunaround/index.php)(requires login).
If you don't want to visit it, here's an example.
The code before one fills the form:
<script type="text/javascript">
function callPublish(msg, attachment, action_link) {
FB.ensureInit(function () {
FB.Connect.streamPublish('', attachment, action_link);
});
}</script>
<input type="button" onclick="callPublish('',null,null);return false;" value="Preview Dialog" />
Then, code after one fills the form:
<script type="text/javascript">
function callPublish(msg, attachment, action_link) {
FB.ensureInit(function () {
FB.Connect.streamPublish('', attachment, action_link);
});
}</script>
<input type="button" onclick="callPublish('',{'name':'My website','href':'http://www.mysite.com/','description':'Visit my website','media':[{'type':'image','src':'http://www.mysite.com/cache.jpg','href':'http://www.mysite.com/'}]},null);return false;" value="Preview Dialog" />
Any help is appreciated. Thanks.
I've been trying to figure it out by looking at the example on this page (http://www.somethingtoputhere.com/therunaround/index.php)(requires login).
If you don't want to visit it, here's an example.
The code before one fills the form:
<script type="text/javascript">
function callPublish(msg, attachment, action_link) {
FB.ensureInit(function () {
FB.Connect.streamPublish('', attachment, action_link);
});
}</script>
<input type="button" onclick="callPublish('',null,null);return false;" value="Preview Dialog" />
Then, code after one fills the form:
<script type="text/javascript">
function callPublish(msg, attachment, action_link) {
FB.ensureInit(function () {
FB.Connect.streamPublish('', attachment, action_link);
});
}</script>
<input type="button" onclick="callPublish('',{'name':'My website','href':'http://www.mysite.com/','description':'Visit my website','media':[{'type':'image','src':'http://www.mysite.com/cache.jpg','href':'http://www.mysite.com/'}]},null);return false;" value="Preview Dialog" />
Any help is appreciated. Thanks.