none
bug in Visual Studio - won't work with google search

    Question

  • Google lets you put in a custom search into your website for free. The URL that explains their code is at: https://developers.google.com/custom-search/docs/element

    But there is a problem.  Even though the code works in production, when I used it in Visual Studio on my development PC, I get an error.

    The code they supply is:

    <!-- Put the following javascript before the closing  tag. -->
    <script>
    (function() {
      var cx = '123:456'; // Insert your own Custom Search engine ID here
      var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
      gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
    })();
    </script>
    
    <!-- Place this tag where you want both of the search box and the search results to render -->
    <gcse:search></gcse:search>

    and the error I get is:

    SCRIPT5022: Syntax error, unrecognized expression: unsupported pseudo: search

    I could probably turn off the 'browserlink' feature of Visual Studio, but why is this happening?  Is Google at fault?

    Tuesday, November 01, 2016 12:08 PM

Answers

  • Hi rating maven,

    Welcome to the MSDN forum.

    Refer to your description and I have confirmed with the ASP.NET support engineer, this issue is more related to the ASP.NET. Since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. Please navigate to this appropriate forum: https://forums.asp.net/15.aspx/1?Getting+Started and start a new thread for your issue, you will get a more professional support from there, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by rating maven Wednesday, November 02, 2016 10:34 AM
    Wednesday, November 02, 2016 7:39 AM
    Moderator

All replies

  • Interesting.  I wonder if you get a similar problem with Chrome.
    Tuesday, November 01, 2016 8:48 PM
  • Hi rating maven,

    Welcome to the MSDN forum.

    Refer to your description and I have confirmed with the ASP.NET support engineer, this issue is more related to the ASP.NET. Since our forum is to discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor. Please navigate to this appropriate forum: https://forums.asp.net/15.aspx/1?Getting+Started and start a new thread for your issue, you will get a more professional support from there, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by rating maven Wednesday, November 02, 2016 10:34 AM
    Wednesday, November 02, 2016 7:39 AM
    Moderator
  • I really thought it was a BrowserLink thing, especially since you can use the internal browser in Visual Studio and it works fine.  I had no problems.

    @rating maven, it would be nice if you post here a link to the other thread that you start, should you decide to do that..

    Wednesday, November 02, 2016 1:51 PM