window object seems to be overwritten or removed from FBJS, i got an
error "a1234567_window" is not defined.
iframe may be can solve the problem since facebook's FBML supports
it ,but i've turned to a server side solution (curl in php)
anyway, great thanks for your help!!
On Oct 31, 1:56 am, "Ben Lisbakken" <[EMAIL PROTECTED]> wrote:
> Try window.eval('var a = 10;');
> and then try to display the variable a in the HTML to see if it was set to
> 10.
>
> But if alert and dynamically appending scripts don't work, I'd be very
> surprised if eval does. What about iFrames? Can you insert an iFrame? Try
> inserting:
> <iframe src="http://www.hi.com/"></iframe>
>
> -Ben
>
> On Thu, Oct 30, 2008 at 10:45 AM, EgistLi <[EMAIL PROTECTED]> wrote:
>
> > i was told that there is a application utilize the google image search
> > function, but i don't exactly know the application's name and how is
> > image search function implemented in thast applicaiton ( maybe it's
> > using soap?)
>
> > alert is not allowed in facebook, in addition, eval cannot work with
> > the error message "a1234567_eval is not defined"
> > On Oct 31, 1:32 am, "Ben Lisbakken" <[EMAIL PROTECTED]> wrote:
> > > The not allowed DOM element sounds like it's from Facebook. I'm very
> > > curious now. Are there other applications using our APIs?
> > > Well, if you're sure you can't dynamically add and append a script tag
> > > (you're positive there isn't a typo or anything in your code), then maybe
> > > there's a way to do it with a static script tag. Can you
> > > document.write('<script src="..."></script>')? Can you eval code? Try
> > > doing eval('alert("Yes you can eval.");');
>
> > > -Ben
>
> > > On Thu, Oct 30, 2008 at 10:21 AM, EgistLi <[EMAIL PROTECTED]> wrote:
>
> > > > i tried the code you provided but firebug reported "script is not an
> > > > allowed DOM element"
>
> > > > On Oct 31, 12:59 am, "Ben Lisbakken" <[EMAIL PROTECTED]> wrote:
> > > > > EgistLi --
> > > > > If you're trying to use our UI components (Search Control, etc.) then
> > I
> > > > > could see if I could figure something out.
>
> > > > > But if you just want to do a search, get the results and display them
> > on
> > > > > your own then you should be fine with the JSONP technique. If you're
> > not
> > > > > familiar with it, JSONP is just another acronym for a simple
> > Javascript
> > > > > idiom. In a nutshell, all it is is dynamically creating a script
> > tag,
> > > > > setting its src and appending it to your page. That script that you
> > > > append
> > > > > will return useful data to you in JSON.
>
> > > > > So go ahead and try it.
> > > > > var funJSONP = document.createElement('script');
> > > > > funJSONP.src = '
> > > >http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Google&ca.
> > ..
> > > > > ';
> > > > > var head = document.getElementsByTagName('head')[0];
> > > > > head.appendChild(funJSONP);
>
> > > > > Notice in the URL there is an &callback CGI arg. I set this to
> > 'myfunc'.
> > > > > If you have a function myfunc then when this script executes it will
> > > > pass
> > > > > an object (the search results) to this function.
>
> > > > > -Ben
>
> > > > > On Thu, Oct 30, 2008 at 9:41 AM, Jeremy Geerdes <[EMAIL PROTECTED]
>
> > > > wrote:
>
> > > > > > Just out of curiosity, have you tried this line:
>
> > > > > > google=google;
>
> > > > > > I don't know that it would work, but if Facebook is just adding the
> > > > > > app id to the front of every JS var, that might be all you need.
>
> > > > > > Jeremy R. Geerdes
> > > > > > Effective website design & development
> > > > > > Des Moines, IA
>
> > > > > > For more information or a project quote:
> > > > > >http://jgeerdes.home.mchsi.com
> > > > > > [EMAIL PROTECTED]
>
> > > > > > Unless otherwise noted, any price quotes contained within this
> > > > > > communication are given in US dollars.
>
> > > > > > If you're in the Des Moines, IA, area, check out Debra Heights
> > > > > > Wesleyan Church!
>
> > > > > > On Oct 30, 2008, at 11:19 AM, EgistLi wrote:
>
> > > > > > > hi everyone, i'm trying to use google ajax search api in a
> > facebook
> > > > > > > application.
> > > > > > > Following the instruction, the google ajax loader is used to load
> > the
> > > > > > > search api dynamically.
>
> > > > > > > unfortunately, before the webpage sending to the browser, the
> > > > facebook
> > > > > > > platform parses and modifies the scripts in the webpage, the code
> > > > > > > below
>
> > > > > > > google.load("search","1");
>
> > > > > > > will be added with a prefix and become
>
> > > > > > > a1234567_google.load("search","1");
>
> > > > > > > thus result in the message "a1234567_google is not defined"
>
> > > > > > > does anyone know how to load the ajax search api without using
> > google
> > > > > > > loader? or the tricks that could work
>
> > > > > > > thanks~!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---