Microsoft Office Sharepoint

All my posts are provided "AS IS" with no warranties, and confer no rights.

Javascript Error: Webform_DoPostbackWithOptions is undefined

Javascript Error: Webform_DoPostbackWithOptions is undefined

  • Comments 2
  • Likes

A javascript error. Simple. Neat. Clean.

But... since you noticed it, no Sharepoint controls are working. No paging controls, no buttons, generally any control that would require a postback between the webbrowser and the server will cease to function properly.

As a root cause analysis for the issue it quickly becomes obvious that the javascript holding the function definition is not available in the browser.Invstigating where the javascript resides you will find out that it is being generated at runtime by the webresource.axd so no js file for the function on the server.

At this point you may wonder : how come it worked or (even more funny) how come it works SOMETIMES ?

Well, following the rabit traces into it's hole, we can identify the following potential resons for the behavior:

  1. access to webresource.axd is restricted (either your firewall restricts some path or you ran URLSCAN on the server and axd files are denied)
  2. Son of Smart Part is installed and somehow reformats the URL that should get to the axd resource
  3. Output caching profiles defined.

As resolution for the possible causes above you should probably:

  1. check your firewall logs for denied axd requests
  2. see Jan Tielen 's http://weblogs.asp.net/jan/archive/2006/03/22/440793.aspx
  3. Edit the Site Collection cache Profiles in the Administration site and modify the Public Internet (Purely Anonymous)  Profile

         Change Vary by HTTP Header from Browser to User-Agent

Perform a clear cache on the object cache and you should be back in business.

Have fun

Comments
  • Hi there !

    Don't know if this thread's still alive, but I exactly encounter that problem, (Webform_DoPostBackWithOptions is undefined) BUT my sharepoint behaves pretty strangely :

    In fact, the error won't pop-up or do an alert on the bottom left-hand corner of the window. The javascript just won't work (but the code behind is perfectly executed, and when I refresh the page, everything's good !

    So to know what was going on I turned on the I.E. dev. tools, that shown me the error.

    Then I found your article, so I checked the connections with fiddler, and found that webresource.axd is accessed, but in that file, there is no method called Webform_DoPostBackWithOptions ().

    And there's no firewall and no cache.

    May that be due to an incorrect version of ASP.NET ?

    Thanks for your help.

    Cheers,

    S.

  • I have encountered this some while ago where no script was executed on page.

    This was happening because of a custom solution that failed to properly execute and as result "broke" the page .

    Looking at the source code, the page had no post action , the buttons were lacking the click actions etc.

    Removed the solution and all came back.Identifying the solution was a matter of disabling them 1 by 1

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment