使用Bing搜索框获取JScript错误

时间:2011-01-15 14:37:26

标签: asp.net

我正在尝试在我的网站上使用Bing搜索框。我刚刚粘贴了Bing网站提供的HTML代码,当我运行.aspx时,我在.js文件中收到此错误,我可以选择中断,继续或忽略。

错误是“Microsoft JScript运行时错误:预期的对象”。我刚把这个文件放在我的源代码中。

<meta name="Search.WLSearchBox" content="1.1, en-IN" />
<div id="WLSearchBoxDiv" style="float:right">
<table cellpadding="0" cellspacing="0" style="width:180px; height:28px;"><tr id="WLSearchBoxPlaceholder"><td style="width:100%; border:solid 1px #cccccc; border-right-style:none; padding-left:10px; padding-right:10px; vertical-align:middle;"><input id="WLSearchBoxInput" type="text" value="&#x4c;&#x6f;&#x61;&#x64;&#x69;&#x6e;&#x67;&#x2e;&#x2e;&#x2e;" disabled="disabled" style="background-image:url(http://www.bing.com/siteowner/s/siteowner/searchbox_background_k.png); background-position:right; background-repeat:no-repeat; font-family:Arial; font-size:14px; color:#000000; width:100%; border:none 0 transparent;"/></td><td style="border:solid 1px #cccccc; border-left-style:none; padding-left:0px; padding-right:3px;"><input id="WLSearchBoxButton" type="image" src="http://www.bing.com/siteowner/s/siteowner/searchbutton_normal_k.gif" style="border:none 0 transparent; height:24px; width:24px; vertical-align:top;"/></td></tr></table>
    <script type="text/javascript" charset="utf-8">
        var WLSearchBoxConfiguration =
    {
        "global": {
            "serverDNS": "www.bing.com",
            "market": "en-US"
        },
        "appearance": {
            "autoHideTopControl": false,
            "width": 600,
            "height": 400,
            "theme": "Green"
        },
        "scopes": [
            {
                "type": "web",
                "caption": "&#x57;&#x65;&#x62;&#x41;&#x73;&#x73;&#x69;&#x73;&#x74;",
                "searchParam": "site:www.webassist.in"
            }
            ,
            {
                "type": "web",
                "caption": "&#x57;&#x65;&#x62;",
                "searchParam": ""
            }
        ]
    }
    </script>
    <script type="text/javascript" charset="utf-8" src="http://www.bing.com/bootstrap.js?market=en-US&ServId=SearchBox&ServId=SearchBoxWeb&Callback=WLSearchBoxScriptReady"></script>

错误是我认为在最后一个名为^ TransientScriptDocument167.js

的脚本文件中

1 个答案:

答案 0 :(得分:0)

嗯,它可能是bootstrap js通过其中一个动态脚本包含的文件,尝试打开firefox,如果你安装了开发人员工具,请查看渲染的源代码。

如果是这种情况,那么由MS开发人员来解决。