Javascript alert

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George

    #16
    Re: Javascript alert

    Is it possible that you doing redirect somewhere there....

    George.


    "Peter" <czupet@nospam. nospamwrote in message
    news:uKROdFPQJH A.444@TK2MSFTNG P05.phx.gbl...
    >
    "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
    news:OlIVqDPQJH A.992@TK2MSFTNG P02.phx.gbl...
    >"Peter" <czupet@nospam. nospamwrote in message
    >news:emhPTBPQJ HA.5064@TK2MSFT NGP03.phx.gbl.. .
    >>
    >>here's the code:
    >>>
    >> protected void butReport_Click (object sender, EventArgs e)
    >> {
    >>>
    >> ClientScript.Re gisterStartupSc ript(GetType(), "failure",
    >>"alert('It did not work');", true);
    >>>
    >> }
    >>
    >Are you sure that it's actually being called? If you put a breakpoint on
    >it and click the button, does execution stop on the above line...?
    >>
    >>
    >>
    --
    >
    >
    Yes, the execution does stop on the line
    >Mark Rae
    >ASP.NET MVP
    >http://www.markrae.net
    >
    >

    Comment

    • Peter

      #17
      Re: Javascript alert


      "George" <noemail@comcas t.netwrote in message
      news:OaF8XXPQJH A.5064@TK2MSFTN GP03.phx.gbl...
      Is it possible that you doing redirect somewhere there....
      >
      George.
      >
      >
      "Peter" <czupet@nospam. nospamwrote in message
      news:uKROdFPQJH A.444@TK2MSFTNG P05.phx.gbl...
      >>
      >"Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
      >news:OlIVqDPQJ HA.992@TK2MSFTN GP02.phx.gbl...
      >>"Peter" <czupet@nospam. nospamwrote in message
      >>news:emhPTBPQ JHA.5064@TK2MSF TNGP03.phx.gbl. ..
      >>>
      >>>here's the code:
      >>>>
      >>> protected void butReport_Click (object sender, EventArgs e)
      >>> {
      >>>>
      >>> ClientScript.Re gisterStartupSc ript(GetType(), "failure",
      >>>"alert('It did not work');", true);
      >>>>
      >>> }
      >>>
      >>Are you sure that it's actually being called? If you put a breakpoint on
      >>it and click the button, does execution stop on the above line...?
      >>>
      >>>
      >>>
      >--
      >>
      >>
      >Yes, the execution does stop on the line
      >>Mark Rae
      >>ASP.NET MVP
      >>http://www.markrae.net
      >>
      >>
      >
      The problem is I am using AjaxToolkit, once I remove the UpdatePanels the
      message displays. But I want to use Ajax


      Comment

      • Peter

        #18
        Re: Javascript alert


        "Peter" <czupet@nospam. nospamwrote in message
        news:%23ndOTsPQ JHA.1160@TK2MSF TNGP02.phx.gbl. ..
        >
        "George" <noemail@comcas t.netwrote in message
        news:OaF8XXPQJH A.5064@TK2MSFTN GP03.phx.gbl...
        >Is it possible that you doing redirect somewhere there....
        >>
        >George.
        >>
        >>
        >"Peter" <czupet@nospam. nospamwrote in message
        >news:uKROdFPQJ HA.444@TK2MSFTN GP05.phx.gbl...
        >>>
        >>"Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
        >>news:OlIVqDPQ JHA.992@TK2MSFT NGP02.phx.gbl.. .
        >>>"Peter" <czupet@nospam. nospamwrote in message
        >>>news:emhPTBP QJHA.5064@TK2MS FTNGP03.phx.gbl ...
        >>>>
        >>>>here's the code:
        >>>>>
        >>>> protected void butReport_Click (object sender, EventArgs e)
        >>>> {
        >>>>>
        >>>> ClientScript.Re gisterStartupSc ript(GetType(), "failure",
        >>>>"alert('I t did not work');", true);
        >>>>>
        >>>> }
        >>>>
        >>>Are you sure that it's actually being called? If you put a breakpoint
        >>>on it and click the button, does execution stop on the above line...?
        >>>>
        >>>>
        >>>>
        >>--
        >>>
        >>>
        >>Yes, the execution does stop on the line
        >>>Mark Rae
        >>>ASP.NET MVP
        >>>http://www.markrae.net
        >>>
        >>>
        >>
        >
        The problem is I am using AjaxToolkit, once I remove the UpdatePanels the
        message displays. But I want to use Ajax
        >
        I use this button as the trigger

        <triggers>

        <asp:AsyncPostB ackTrigger ControlID="butR eport" EventName="Clic k" />

        </triggers>


        Comment

        • Vinay Khaitan

          #19
          Re: Javascript alert

          The problem is I am using AjaxToolkit, once I remove the UpdatePanels the
          message displays. But I want to use Ajax
          Could not you tell this simple information earlier ?

          --
          Vinay Khaitan
          [Windows Forms Layout Control]

          ----------------------------------------------------------------






          Comment

          • Vinay Khaitan

            #20
            Re: Javascript alert

            Okay, now the solution.
            ScriptManager.R egisterStartupS cript()
            with similar argument syntax as earlier ones. If you are using update panel,
            you must be using ScriptManager.

            --
            Vinay Khaitan
            [Windows Forms Layout Control]

            ----------------------------------------------------------------


            "Peter" <czupet@nospam. nospamwrote in message
            news:uI9hAwPQJH A.3876@TK2MSFTN GP04.phx.gbl...
            >
            "Peter" <czupet@nospam. nospamwrote in message
            news:%23ndOTsPQ JHA.1160@TK2MSF TNGP02.phx.gbl. ..
            >>
            >"George" <noemail@comcas t.netwrote in message
            >news:OaF8XXPQJ HA.5064@TK2MSFT NGP03.phx.gbl.. .
            >>Is it possible that you doing redirect somewhere there....
            >>>
            >>George.
            >>>
            >>>
            >>"Peter" <czupet@nospam. nospamwrote in message
            >>news:uKROdFPQ JHA.444@TK2MSFT NGP05.phx.gbl.. .
            >>>>
            >>>"Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
            >>>news:OlIVqDP QJHA.992@TK2MSF TNGP02.phx.gbl. ..
            >>>>"Peter" <czupet@nospam. nospamwrote in message
            >>>>news:emhPTB PQJHA.5064@TK2M SFTNGP03.phx.gb l...
            >>>>>
            >>>>>here's the code:
            >>>>>>
            >>>>> protected void butReport_Click (object sender, EventArgs e)
            >>>>> {
            >>>>>>
            >>>>> ClientScript.Re gisterStartupSc ript(GetType(), "failure",
            >>>>>"alert(' It did not work');", true);
            >>>>>>
            >>>>> }
            >>>>>
            >>>>Are you sure that it's actually being called? If you put a breakpoint
            >>>>on it and click the button, does execution stop on the above line...?
            >>>>>
            >>>>>
            >>>>>
            >>>--
            >>>>
            >>>>
            >>>Yes, the execution does stop on the line
            >>>>Mark Rae
            >>>>ASP.NET MVP
            >>>>http://www.markrae.net
            >>>>
            >>>>
            >>>
            >>
            >The problem is I am using AjaxToolkit, once I remove the UpdatePanels the
            >message displays. But I want to use Ajax
            >>
            >
            I use this button as the trigger
            >
            <triggers>
            >
            <asp:AsyncPostB ackTrigger ControlID="butR eport" EventName="Clic k" />
            >
            </triggers>
            >
            >

            Comment

            • Peter

              #21
              Re: Javascript alert


              "Vinay Khaitan" <vkhaitan@gmail .comwrote in message
              news:uNTut1PQJH A.1876@TK2MSFTN GP06.phx.gbl...
              Okay, now the solution.
              ScriptManager.R egisterStartupS cript()
              with similar argument syntax as earlier ones. If you are using update
              panel, you must be using ScriptManager.
              >
              --
              Vinay Khaitan
              [Windows Forms Layout Control]

              ----------------------------------------------------------------
              >
              >
              "Peter" <czupet@nospam. nospamwrote in message
              news:uI9hAwPQJH A.3876@TK2MSFTN GP04.phx.gbl...
              >>
              >"Peter" <czupet@nospam. nospamwrote in message
              >news:%23ndOTsP QJHA.1160@TK2MS FTNGP02.phx.gbl ...
              >>>
              >>"George" <noemail@comcas t.netwrote in message
              >>news:OaF8XXPQ JHA.5064@TK2MSF TNGP03.phx.gbl. ..
              >>>Is it possible that you doing redirect somewhere there....
              >>>>
              >>>George.
              >>>>
              >>>>
              >>>"Peter" <czupet@nospam. nospamwrote in message
              >>>news:uKROdFP QJHA.444@TK2MSF TNGP05.phx.gbl. ..
              >>>>>
              >>>>"Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
              >>>>news:OlIVqD PQJHA.992@TK2MS FTNGP02.phx.gbl ...
              >>>>>"Peter" <czupet@nospam. nospamwrote in message
              >>>>>news:emhPT BPQJHA.5064@TK2 MSFTNGP03.phx.g bl...
              >>>>>>
              >>>>>>here's the code:
              >>>>>>>
              >>>>>> protected void butReport_Click (object sender, EventArgs e)
              >>>>>> {
              >>>>>>>
              >>>>>> ClientScript.Re gisterStartupSc ript(GetType(), "failure",
              >>>>>>"alert('I t did not work');", true);
              >>>>>>>
              >>>>>> }
              >>>>>>
              >>>>>Are you sure that it's actually being called? If you put a breakpoint
              >>>>>on it and click the button, does execution stop on the above line...?
              >>>>>>
              >>>>>>
              >>>>>>
              >>>>--
              >>>>>
              >>>>>
              >>>>Yes, the execution does stop on the line
              >>>>>Mark Rae
              >>>>>ASP.NET MVP
              >>>>>http://www.markrae.net
              >>>>>
              >>>>>
              >>>>
              >>>
              >>The problem is I am using AjaxToolkit, once I remove the UpdatePanels
              >>the message displays. But I want to use Ajax
              >>>
              >>
              >I use this button as the trigger
              >>
              ><triggers>
              >>
              ><asp:AsyncPost BackTrigger ControlID="butR eport" EventName="Clic k" />
              >>
              ></triggers>
              >>
              >>
              >
              >
              Thank you

              That fixed the problem


              Comment

              Working...