script running error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kbipul
    New Member
    • Nov 2006
    • 27

    script running error

    I have created an application is .Net 2.0 + using WWF of .Net 3.0 too. When trying to access a page in the application through IE 6.0, the page becomes unstable and i get an error message box stating :

    "A script on this page is causing the internet explorer to run slowly.if it continues to run,your computer may become unresponsive.Do you want to abort the script?"



    I tried to search for solution on the net but couldn't get any. Please help me soon.
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Have you tried debugging the application?

    Or wait until the application times out and see what error the server gives

    Comment

    • kbipul
      New Member
      • Nov 2006
      • 27

      #3
      Originally posted by Shashi Sadasivan
      Have you tried debugging the application?

      Or wait until the application times out and see what error the server gives

      I am unable to find out the server error. Anyways, I am not getting any server error at the page load event. I am clueless now.

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        any luck with debugging?
        go line by line

        what should happen is that some line of your code is contacting somewhere (DB or another site......) and the response is taking too long. So when u debug each line yo u will know where it is hanging.

        if thi sis running well on ure dev system and not on client then put in statements in between your code which wil log data into a file.
        so thats one way of finding out (without debug mode) on where youre code is hanging up. (One of the cheeky ways to debug C :D)

        Comment

        • kbipul
          New Member
          • Nov 2006
          • 27

          #5
          protected void gvCerApproveLnd _RowDataBound(o bject sender, GridViewRowEven tArgs e)
          {

          if (e.Row.RowType == DataControlRowT ype.DataRow)
          {
          CheckBox chk = (CheckBox)e.Row .FindControl("c hkAgreement");
          //((CompareValida tor)e.Row.FindC ontrol("Compare Validator112")) .ValidationGrou p += e.Row.RowIndex;
          ((RequiredField Validator)e.Row .FindControl("R equiredFieldVal idatorC")).Vali dationGroup += e.Row.RowIndex;
          ((LinkButton)e. Row.Cells[e.Row.Cells.Cou nt - 2].Controls[0]).ValidationGro up += e.Row.RowIndex;
          if (Convert.ToBool ean(gvCerApprov eLnd.DataKeys[e.Row.RowIndex]["Agreement_Requ ired"].ToString())) ((CheckBox)e.Ro w.FindControl(" chkAgreement")) .Checked = true;
          ((DropDownList) e.Row.FindContr ol("ddlPassFail ")).SelectedIte m.Text = gvCerApproveLnd .DataKeys[e.Row.RowIndex]["Certification_ Status"].ToString();
          if (gvCerApproveLn d.DataKeys[e.Row.RowIndex]["Certification_ Status_ID"].ToString() == "2")
          {
          string javascriptFunct ion = "Javascript : ShowDiv('" + divAddAgreement .ClientID + "','" + chk.ClientID + "','" + ((TextBox)Detai lsView1.FindCon trol("txtName") ).ClientID + "','" + gvCerApproveLnd .DataKeys[e.Row.RowIndex]["EMP_NAME"].ToString() + "'";
          javascriptFunct ion += ",'" + ((TextBox)Detai lsView1.FindCon trol("txtID")). ClientID + "','" + gvCerApproveLnd .DataKeys[e.Row.RowIndex]["EMPLID"].ToString() + "'";
          javascriptFunct ion += ",'" + ((TextBox)Detai lsView1.FindCon trol("txtAgreem entAmount")).Cl ientID + "','" + ((TextBox)e.Row .FindControl("t xtCerAmount")). ClientID + "'";
          javascriptFunct ion += ",'" + hfCerId.ClientI D + "','" + gvCerApproveLnd .DataKeys[e.Row.RowIndex]["Employee_Certi fication_ID"].ToString() + "'";
          javascriptFunct ion += ",'" + hfWfId.ClientID + "','" + e.Row.RowIndex. ToString() + "'";
          javascriptFunct ion += ",'" + ((TextBox)Detai lsView1.FindCon trol("txtDateOf Claim")).Client ID + "','" + ((TextBox)e.Row .FindControl("t xtDateOfClaim") ).ClientID + "'";
          javascriptFunct ion += ",'" + ((TextBox)Detai lsView1.FindCon trol("txtAmtCer ")).ClientI D + "','" + ((DropDownList) e.Row.FindContr ol("ddlPassFail ")).ClientI D + "','" + ((DropDownList) DetailsView1.Fi ndControl("ddlP assFail")).Clie ntID + "');";
          ((CheckBox)e.Ro w.FindControl(" chkAgreement")) .Attributes.Add ("onclick", javascriptFunct ion);

          e.Row.Cells[13].Enabled = false;
          }
          else
          {
          ((CheckBox)e.Ro w.FindControl(" chkAgreement")) .Enabled = false;
          ((DropDownList) e.Row.FindContr ol("ddlPassFail ")).Enabled = false;
          ((TextBox)e.Row .FindControl("t xtCerAmount")). Enabled = false;
          ((RequiredField Validator)e.Row .FindControl("R equiredFieldVal idator7")).Vali dationGroup += e.Row.RowIndex;
          e.Row.Cells[13].Enabled = true;
          ((LinkButton)e. Row.Cells[e.Row.Cells.Cou nt - 2].Controls[0]).Text = "Final Approval";
          ((LinkButton)e. Row.Cells[e.Row.Cells.Cou nt - 2].Controls[0]).CommandName = "FinalApproval" ;

          }
          }


          This part of the code gets executed many times
          when i deleted the entries and the data base i found out that the problem doesn't come if there are only 13 records for this page then there is no prob. But as soon as the no of data is increased the page becomes inconsistant.

          Comment

          Working...