Google transliteration not working in SSL access w

2019-06-13 03:01发布

I am using Google transliteration (ctrl + G) in my website. It Works fine.

After Secure connection (SSL) Google transliteration API shows the below error , Blocked loading mixed active content "http://www.google.com/inputtools/request?text=......."

even me entered, https://www.google.com/jsapi

Can someone help me? Thanks in advance.

1条回答
老娘就宠你
2楼-- · 2019-06-13 03:22
<textarea id="lazeez-sms-hindi-converter" style="width:30em; height:20em" name="lazeez-sms-hindi-converter"></textarea>
<input type="button" id="convert" value="Convert">

<script type="text/javascript" src="jquery-latest.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script>
function translitrate(w) {
    $.ajax({
        url: 'https://www.google.com/inputtools/request',
        dataType: 'jsonp',
        jsonp: 'cb',
        data: {
            text: w,
            ime: "transliteration_en_hi",
            num: 5,
            cp: 0,
            cs: 1,
            ie: "utf-8",
            oe: "utf-8",
            app: "lazeez-sms"
        },
        success: function(data) {
            $("#lazeez-sms-hindi-converter").val(data[1][0][1][0] + '\n\n' + $("#lazeez-sms-hindi-converter").val());
        }
    });
}


$("#convert").click(function() {
    var code = $('#lazeez-sms-hindi-converter').val();
    translitrate(code);
});

</script>
查看更多
登录 后发表回答