As a follow-up to my previous email, I did attempt to access the object through dot notation based on the different layers visible from the link below, but still could not figure out how to access or print anything of value.


On Tue, Jun 15, 2010 at 1:54 PM, Aaron Ward <> wrote:
Thanks Roan, that helped a bit. You were correct, the myFunc() definition had to be placed before the src. Through further research I discovered (what I believe is) the exact API call that I need for the output that I desire. However, I'm still having trouble with JavaScript accessing the returned value from the callback. At this point, I'm trying to assign the callback value to a variable and print it to the screen to confirm that I have what I'm after. So far, the only value I've been able to retrieve from the callback is:
[object Object]

What I'm after is what is printed to the screen when you go to the following link:

Does anybody see where I'm going wrong or have any suggestions?



<script type="text/javascript" >

function myFunc(str){
 //var testVar = JSON.parse(str);

 //location.href = ""+str;
<script type="text/javascript" src=""></script>

Thanks again,

On Tue, Jun 15, 2010 at 3:40 AM, Roan Kattouw <> wrote:
2010/6/15 Aaron Ward <>:
> <script type="text/javascript"
> src="">
> function myFunc(str){
>     document.write(str);
>     document.write("Hrm");
> }
> </script>
I'm not sure you can mix src="" with content like that. Try using 1)
separate tags for the src="" script and the myFunc() definition and 2)
putting the myFunc() definition *before* the src=""

Roan Kattouw (Catrope)

Mediawiki-api mailing list