Assuming you are using the same minified version of transliteration.I.js as 
I have, add the following line after control initialization.  The code will 
look like:


        var control =
            new 
google.elements.transliteration.TransliterationControl(options);
   
        var ids = ["transl1", "transl2"];
        control.makeTransliteratable(ids);


//Add the following line to make it work over https
        control.c.qc.t13n.c[3].c.d.keyup[0].ia.F.p = 
'https://www.google.com';   

That will make sure that all XHR calls to google transliteration API is 
done via https.



On Thursday, January 14, 2016 at 10:05:04 PM UTC-5, Sean Dunn wrote:
>
> Hello,
>
> I'm attempting to use the google transliterate (not translate) API in a 
> SPA. Due to certain considerations, the SPA must be served over https. When 
> I attempt to use the api on an input element, I get the following error:
>
> "Blocked loading mixed active content "
> http://www.google.com/inputtools/request?text=al-asfar&ime=transliteration_en_ar&num=5&cp=0&cs=0&ie=utf-8&oe=utf-8&app=jsapi&uv&cb=_callbacks_._0ijf27fk9
> "
>
> The only fix i could think of was loading the API in the head over https 
> by changing...
>
> <script type="text/javascript" src="http://www.google.com/jsapi";></script>
>
> to...
>
> <script type="text/javascript" src="HTTPS://www.google.com/jsapi
> "></script>
>
> emphasis added. But that didn't work. Even after clearing the cache.
>
> I guess that this is hard-coded into the transliteration control object, 
> but I’m not sure where. When I copy that "mixed active content" URL into my 
> browser and change http to https, I get a working response. Try here:
>
>
> https://www.google.com/inputtools/request?text=al-asfar&ime=transliteration_en_ar&num=5&cp=0&cs=0&ie=utf-8&oe=utf-8&app=jsapi&uv&cb=_callbacks_._0ijf27fk9
>
> If anyone has an idea for a workaround, or something obvious that I've 
> missed, I'd really appreciate it. The API absolutely rocks otherwise.
>
> Thanks,
>
> A Newbie
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax-search-api@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-search-api+unsubscr...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/5364bf9b-009c-48fd-8394-874238f7ab2d%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-ajax-search-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to