<p>The __doPostBack is not working in firefox 3 (have not checked 2).  Everything is working great in IE 6&amp;7 and it even works in Chrome??</p>

<p>It's a simple asp:LinkButton with an OnClick event</p>

<pre><code>&lt;asp:LinkButton ID="DeleteAllPicturesLinkButton" Enabled="False" OnClientClick="javascript:return confirm('Are you sure you want to delete all pictures? \n This action cannot be undone.');" OnClick="DeletePictureLinkButton_Click" CommandName="DeleteAll" CssClass="button" runat="server"&gt;
</code></pre>

<p>The javascript confirm is firing so I know the javascript is working, it's specirically the __doPostBack event.  There is a lot more going on on the page, just didn't know if it's work it to post the entire page.</p>

<p>I enable the control on the page load event.</p>

<p>Any ideas?</p>

<hr>

<p>I hope this is the correct way to do this, but I found the answer.  I figured I'd put it up here rather then in a stackoverflow "answer"</p>

<p>Seems it had something to do with nesting ajax toolkit UpdatePanel. When I removed the top level panel it was fixed.</p>

<p>Hope this helps if anyone else has the same problem.  I still don't know what specifically was causing the problem, but that was the solution for me.</p>

[{'answer_id': 55367, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 1, 'selected': False, 'text': '<p>Is it because you are doing <strong>return</strong> confirm? seems like the return statement should prevent the rest of the code from firing. i would think an if statement would work</p>\n\n<pre><code>if (!confirm(...)) { return false; } _doPostBack(...);\n</code></pre>\n\n<p>Can you post all the js code in the OnClick of the link?</p>\n\n<p><strong>EDIT</strong>: aha, forgot that link button emits code like this </p>\n\n<pre><code>&lt;a href="javascript:__doPostBack()" onclick="return confirm()" /&gt;\n</code></pre>\n'}, {'answer_id': 55379, 'author': 'Dan Williams', 'author_id': 4230, 'author_profile': 'https://Stackoverflow.com/users/4230', 'pm_score': 0, 'selected': False, 'text': "<p>With or without the OnClientClick event it still doesn't work.</p>\n\n<p>The _doPostBack event is the auto generated javascript that .NET produces.</p>\n\n<pre><code>function __doPostBack(eventTarget, eventArgument) {\n\n    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {\n\n        theForm.__EVENTTARGET.value = eventTarget;\n\n        theForm.__EVENTARGUMENT.value = eventArgument;\n\n        theForm.submit();\n\n    }\n\n}\n</code></pre>\n\n<p>*The &amp;95; are underscores, seems to be a problem with the stackoverflow code block format.</p>\n"}, {'answer_id': 55387, 'author': 'Paulj', 'author_id': 5433, 'author_profile': 'https://Stackoverflow.com/users/5433', 'pm_score': 1, 'selected': False, 'text': "<p>this might seem elemental, but did you verify that your firefox settings aren't set to interfere with the postback? Sometimes I encounter similar problems due to a odd browser configuration I had from a debugging session.</p>\n"}, {'answer_id': 55413, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 0, 'selected': False, 'text': "<p>Now that i think about it, as noted in my last edit, you want to drop the javascript: in the on client click property. It's not needed, because the onclick event is javascript as it is. try that, see if that works.</p>\n"}, {'answer_id': 55420, 'author': 'moza', 'author_id': 3465, 'author_profile': 'https://Stackoverflow.com/users/3465', 'pm_score': 1, 'selected': False, 'text': '<p>Are you handling the PageLoad event? If so, try the following</p>\n\n<pre><code>if (!isPostBack)\n{\n    //do something\n}\nelse if (Request.Form["__EVENTTARGET"].ToLower().IndexOf("myevent") &gt;= 0)\n{\n    //call appropriate function.\n}\n</code></pre>\n\n<p>Check if you are getting a call this way, if so then maybe the event is not wired and nedes to be explicitly called.</p>\n'}, {'answer_id': 55430, 'author': 'Jimmy', 'author_id': 4435, 'author_profile': 'https://Stackoverflow.com/users/4435', 'pm_score': 1, 'selected': False, 'text': '<p>what do you expect from "Enabled = \'false\'" ?</p>\n'}, {'answer_id': 55478, 'author': 'seanb', 'author_id': 3354, 'author_profile': 'https://Stackoverflow.com/users/3354', 'pm_score': 1, 'selected': False, 'text': '<p>I have had problems with firebug on some web forms, something to do with the network analyser can screw with postbacks.</p>\n'}, {'answer_id': 57232, 'author': 'Dan Williams', 'author_id': 4230, 'author_profile': 'https://Stackoverflow.com/users/4230', 'pm_score': 0, 'selected': False, 'text': '<p>Seems it had something to do with nesting ajax toolkit UpdatePanel.  When I removed the top level panel it was fixed.</p>\n\n<p>Hope this helps if anyone else has the same problem.</p>\n'}, {'answer_id': 87364, 'author': 'Seibar', 'author_id': 357, 'author_profile': 'https://Stackoverflow.com/users/357', 'pm_score': 4, 'selected': True, 'text': '<p>Check your User Agent string. This same thing happened to me one time and I realized it was because I was testing out some pages as "googlebot". The JavaScript that is generated depends on knowing what the user agent is.</p>\n\n<p>From <a href="http://support.mozilla.com/tiki-view_forum_thread.php?locale=tr&amp;comments_parentId=160492&amp;forumId=1" rel="noreferrer">http://support.mozilla.com/tiki-view_forum_thread.php?locale=tr&amp;comments_parentId=160492&amp;forumId=1</a>:</p>\n\n<blockquote>\n  <p>To reset your user agent string type about:config into the location bar and press enter. This brings up a list of preferences. Enter general.useragent into the filter box, this should show a few preferences (probably 4 of them). If any have the status user set, right-click on the preference and choose Reset</p>\n</blockquote>\n'}, {'answer_id': 394236, 'author': 'pearcewg', 'author_id': 24126, 'author_profile': 'https://Stackoverflow.com/users/24126', 'pm_score': 0, 'selected': False, 'text': '<p>I had this exact same issue in a web app I was working on, and I tried solving it for hours.</p>\n\n<p>Eventually, I did a NEW webform, dropped a linkbutton in it, and it worked perfectly!</p>\n\n<p>I then noticed the following issue:</p>\n\n...\n\n<p>I switch the order to the following, and it immediately was fixed:\n...</p>\n\n<p>IE had no issue either way (that I noticed anyway).</p>\n'}, {'answer_id': 1004304, 'author': 'Todd', 'author_id': 54305, 'author_profile': 'https://Stackoverflow.com/users/54305', 'pm_score': 2, 'selected': False, 'text': '<p>I had this same problem (__doPostBack not working) in Firefox- caused a solid hour of wasted time. The problem turned out to be the HTML. If you use HTML like this:</p>\n\n<pre><code>&lt;input type="button" id="yourButton" onclick="doSomethingThenPostBack();" value="Post" /&gt;\n</code></pre>\n\n<p>Where "doSomethingThenPostBack" is just a JavaScript method that calls __doPostBack, the form <strong><em>will not</em></strong> post in Firefox. It <strong><em>will</em></strong> PostBack in IE and Chrome. To solve the problem, make sure your HTML is:</p>\n\n<pre><code>&lt;input type="submit" id="yourButton" ...\n</code></pre>\n\n<p>The key is the <strong>type</strong> attribute. It must be "<strong>submit</strong>" in Firefox for __doPostBack to work. Other browsers don\'t seem to care. Hope this helps anyone else who hits this problem.</p>\n'}, {'answer_id': 3092596, 'author': 'DotNetDevster', 'author_id': 373095, 'author_profile': 'https://Stackoverflow.com/users/373095', 'pm_score': 0, 'selected': False, 'text': '<p>I had a similar issue. It turned out that Akamai was modifying the user-agent string because an setting was being applied that was not needed.</p>\n\n<p>This meant that some .NET controls did not render __doPostBack code properly. This issue has been blogged <a href="http://www.dotnetlite.com/2010/06/21/loss-of-__dopostback-code-after-protecting-a-site-with-akamai/" rel="nofollow noreferrer">here</a>.</p>\n'}, {'answer_id': 3994067, 'author': 'AlwaysLearning', 'author_id': 390122, 'author_profile': 'https://Stackoverflow.com/users/390122', 'pm_score': 0, 'selected': False, 'text': '<p>@Terrapin: you got this exactly right (for me, anyways).</p>\n\n<p>I was running User Agent Switcher and had inadvertently left the Googlebot 2.1 agent selected.</p>\n\n<p>In Reporting Services 2008 it was causing the iframes that reports are actually rendered in to be about 300x200 px, and in Reporting Services 2008 R2 is was throwing "__doPostBack undefined" errors in the Error Console.</p>\n\n<p>Switching back to the Default User Agent fixed all my issues.</p>\n'}, {'answer_id': 24784827, 'author': 'SSZero', 'author_id': 400323, 'author_profile': 'https://Stackoverflow.com/users/400323', 'pm_score': 0, 'selected': False, 'text': '<p>I had the same problem with Firefox. Instead of using <code>__doPostBack()</code> could you use the jQuery .trigger() method to trigger a click action on an element that has your postback event registered as the click action?</p>\n\n<p>For example, if you had this element in your aspx page:</p>\n\n<pre><code>&lt;asp:Button runat="server" ID="btnMyPostback" OnClick="btnMyPostback_Click" CssClass="hide" ToolTip="Click here to submit this transaction."  /&gt;\n</code></pre>\n\n<p>And your postback event in your controller:</p>\n\n<pre><code> protected void btnMyPostback_Click(object sender, EventArgs e)\n {\n     //do my postback stuff\n }\n</code></pre>\n\n<p>You could do the postback by calling:</p>\n\n<pre><code>$("#btnMyPostback").trigger("click");\n</code></pre>\n\n<p>This will cause the <code>Page_Load</code> event to fire if you need to do something on <code>Page_Load</code>.</p>\n'}]
['https://Stackoverflow.com/questions/55360', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4230/']