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 8693435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:32:34+00:00 2026-06-13T00:32:34+00:00

I have the following code which is working fine on the development machine. But,

  • 0

I have the following code which is working fine on the development machine. But, when I deploy it to IIS, the .click() does not fire.

  1. I have drop down box, when a status is selected, I add the following code to open up a RadWindow

    if (ddlStatusID.SelectedValue.ToString() == "2")
         btnUpdateStatus.Attributes.Add("onclick", "return OpenWindow2('" + 
         ResolveUrl("~/Request/AddBillableTime.aspx?  RequestId=" + RequestId.ToString()) +  
    "','650','320');");
    else
       btnUpdateStatus.Attributes.Add("onclick", "");
    
  2. In the popup page, when the user clicks on a button I add do the following

    ClientScript.RegisterStartupScript(this.GetType(), "CloseWindow", 
     "ClosePopup();", true);
    

This is the ClosePopup javascript.

function ClosePopup() {
    //debugger;
    alert('This is before closing the window');
    var oWindow = GetRadWindow();
    oWindow.argument = null;
    oWindow.close();
    alert('This is after closing the window');
    oWindow.BrowserWindow.ButtonClick();
    }
  1. In the main window, I have following javascript, which is invoked in the last line of the above javascript.

    function ButtonClick() {
    //debugger;
    alert('This is before button click!');
    var btnUpdateStatus =   
    document.getElementById('ctl00_ContentPlaceHolder1_btnUpdateStatus');
    alert('This is getting the button!');
    btnUpdateStatus.setAttribute("onclick", "");
    alert('This is setting the button!');
    btnUpdateStatus.click();
    alert('This is after clicking the button!');
    

    }

I have used the alerts to check how far the javascript function is executed.

The entire functionality is working fine when I run it using Visual Studio and also when I host it in my local IIS server. But, when I deploy it to the server, the click() event stops firing.

Please let me know if there is anything wrong in the code.

  • 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-06-13T00:32:35+00:00Added an answer on June 13, 2026 at 12:32 am

    I didn’t had time to look into this issue for some as I was assigned to a new task. But had to fix it once I was back in the same task. I got some help from a friend of mine to fix the issue. I had to change the current logic a bit and have explained the solution below.

    I changed the ButtonClick function as below to create a manual post back to the page using the __doPostBack function.

    function ButtonClick() {
    __doPostBack('btnUpdatePage', '');
    return;
    }
    

    I handled the post back from the Page_Load method of the page.

    if (Request["__EVENTTARGET"] == "btnUpdatePage")
    {
         UpdateStatus();
    }
    

    If the post back event target matches the assigned event target from the __doPostBack method, then I called a method to update the status.

    This way I could avoid the issue. But I do not know why the event was not fired using the old ButtonClick function.

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

Sidebar

Related Questions

I have the following code which is working fine , but can anybody tell
Hi i have the following code which works fine in my machine but when
I have the simple following code, which is working in a ruby (not rails)
I have the following code snippet which is working fine: ifstream NDSConfig( NDS.config )
i have following code, details.php working fine. but when i access gotolink.php its directing
I have the following code which is working but it is very dirty. Actually
I have the following code which is working, I was wondering if this can
I have trouble to get gluLookAt working. I have the following code which works
I have the follwing code (which is not working): private void Window_PreviewKeyDown(object sender, KeyEventArgs
I have following code which works for radio buttons but need to be changed

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.