Ajax error "Syntax error, unrecognized expression: #[object Object]"
Hello,
Whenever I make any kind of Ajax call in jQuery 1.8.3 or 1.9, I get stopped at:
- Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
- };
with: "Syntax error, unrecognized expression: #[object Object]". My $.load call is below. I haven't been able to find any solutions online: maybe my GoogleFu isn't as good as I thought
- $(function () {
- $(".personPopupTrigger").hover(
- function () {
- var TheLink = $(this);
- var settings = $(this).attr('rel');
- if (settings == '')
- return;
- $("#personPopupContainer").show()
- $('#personPopupContent').load('person.aspx?e='+ settings + ' .personPopupResult', function () {
- $("#personPopupContainer").position(
- {
- my: "left bottom",
- at: "left top",
- of: $("#" + TheLink).parent(),
- collosion: 'none'
- }
- )
- });
- },
- function () {
- $("#personPopupContainer").hide();
- }
- );
- });
The response from the server according to Fiddler is:
- HTTP/1.1 200 OK
- Server: ASP.NET Development Server/10.0.0.0
- Date: Fri, 18 Jan 2013 16:38:08 GMT
- X-AspNet-Version: 4.0.30319
- Cache-Control: private
- Content-Type: text/html; charset=utf-8
- Content-Length: 1669
- Connection: Close
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head><title>
- </title><link href="App_Themes/Ruskin/common.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Ruskin/Styles1.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Ruskin/tabs1.css" type="text/css" rel="stylesheet" /></head>
- <body>
- <form name="form1" method="post" action="person.aspx?e=webmaster%40ruskin.com" id="form1">
- <div>
- <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="0vGWKme7rsCeEVvBXCYwVk13m30ut0zBMhHn9T4WZHoeM0QzaIsKDD+hN4mr01RvEYdK/jc8bWiKjPiBZ/hShiayqpB1nPr1eQ/PLMHbYvYZgZ5z5lxQHHzOBmbhWSjs4bvl8FvgUYYkYuIN" />
- </div>
- <div>
- <input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />
- </div>
- <div class="personPopupResult">
-
- <table cellspacing="0" border="0" id="FormView1" style="border-collapse:collapse;">
- <tr>
- <td colspan="2">
- <div>
- <span id="FormView1_FirstNameLabel">FirstName</span>
- <span id="FormView1_LastNameLabel">LastName</span>
- </div>
- <img src="http://home.ruskin/empix/2213.jpg" style="float: left; margin: 5px;" />
-
- Email:
- <span id="FormView1_EmailLabel">email address</span>
- <br />
- Extension:
- <span id="FormView1_ExtensionLabel">5404</span>
- <br />
- </td>
- </tr>
- </table>
-
-
-
- </div>
- </form>
- </body>
- </html>
I just have a feeling I'm missing something stupidly simple here...