Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7169347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:58:15+00:00 2026-05-28T14:58:15+00:00

Google chrome gives this javascript error Uncaught TypeError: Object javascript:__doPostBack(‘ctl00$MainContentPlaceHolder$lnkBtnHidden’,”) has no method ‘click’

  • 0

Google chrome gives this javascript error

Uncaught TypeError: Object javascript:__doPostBack('ctl00$MainContentPlaceHolder$lnkBtnHidden','') has no method 'click'

while executing this line

window.opener.document.getElementById('ctl00_MainContentPlaceHolder_lnkBtnHidden').click();

I have verified that the control is in the opener page and that the ID of the button is same as well, but window.opener.document.getElementById('ctl00_MainContentPlaceHolder_lnkBtnHidden') returns this, rather than an object:

javascript:__doPostBack('ctl00$MainContentPlaceHolder$lnkBtnHidden','')

This happens only in Chrome…

EDIT: The code used to open the window is like this:

win= window.open('/PageName.aspx?qs=qsValue','','scrollbars=1,width=1000,height=950');
win.moveTo(0,0);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:58:15+00:00Added an answer on May 28, 2026 at 2:58 pm

    Don’t be confused by the returned

        
    javascript:__doPostBack('ctl00$MainContentPlaceHolder$lnkBtnHidden','') 

    some browsers use the href-attribute of an hyperlink as a string-representation of the <a/>-element.
    The returned object still is the element-object.

    I already wrote inside the comment that click() in (my) Chrome doesn’t work on a-elements. It works for me in input[type=submit] , but maybe your chrome-version doesn’t support it. But that doesn’t matter as long as you can’t rely on the fact that click() works anywhere.

    When your approach by using dispatchEvent() doesn’t work, I guess your implementation is wrong, here an example-function:

    //@param obj element where to simulate the click
    function simclick(obj)
    {
    
      if(document.fireEvent) {
        obj.fireEvent("onclick"); 
    
        }
       else if(document.dispatchEvent) { 
        var oEvent = document.createEvent( "MouseEvents" );
        oEvent.initMouseEvent("click", true, true,window, 1, 1, 1, 1, 1, false, false, false, false, 0, obj);
        obj.dispatchEvent( oEvent );
        } 
    }
    

    What else: you should move the call of javascript:__doPostBack() from the href-attribute to the onclick-attribute. Otherwise there is no guarantee that the function gets called(depending on the browser).

    see an example: http://fiddle.jshell.net/doktormolle/swR59/show/
    opener-source: http://jsfiddle.net/doktormolle/swR59/
    popup-source: http://jsfiddle.net/doktormolle/vHwCr/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php
When using Google Chrome, I want to debug some JavaScript code. How can I
I want to use google chrome as a control. I think Enso does this
Note: I'm using Google Chrome Currently I have this test page http://www.evecakes.com/doodles/canvas_size_issue.htm It should
This script works perfectly in all the browsers, except Google Chrome. $(document).ready(function(){ $(.banners-anim img).each(function(){
Is this a technology I should spend much time evaluating? http://code.google.com/chrome/chromeframe/ Chrome Frame is
I wrote this code and it is working nicely in Google Chrome but when
I use flexboxes in Google Chrome (only this browser has to be supported) to
I'm using XMLHttpRequest in JavaScript. However, it gives me an error, and I don't
I'm writing a google chrome extension that uses chrome.pageCapture.saveAsMHTML(object details, function callback) function callback

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.