Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. PopUp __dopostback

PopUp __dopostback

Scheduled Pinned Locked Moved ASP.NET
helpjavascripttoolsquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    garfield185
    wrote on last edited by
    #1

    Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.

    <script language="javascript">
    var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
    var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
    if (Resp == True)
    {
    __doPostBack('btnBorrar','1');
    }
    </script>

    It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.

    D N 2 Replies Last reply
    0
    • G garfield185

      Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.

      <script language="javascript">
      var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
      var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
      if (Resp == True)
      {
      __doPostBack('btnBorrar','1');
      }
      </script>

      It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      You should use Page.GetPostBackEventReference. Have a look here, http://weblogs.asp.net/mnolton/archive/2003/06/04/8260.aspx[^]


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • G garfield185

        Hi everybody. I need some help with a problem. Can anybody say what's wrong with my script? When executing, IE says that there is an error on the line with the __dopostback. I do not have knowledge on javascript, but I copied the code and made it work sometimes. Right now, I'm going crazy with it. Thanks in advance.

        <script language="javascript">
        var sFeatures='dialogWidth: 500px;dialogHeight: 200px;status:no;scroll:no';
        var Resp = window.showModalDialog('PopUpMsg.aspx', window,sFeatures);
        if (Resp == True)
        {
        __doPostBack('btnBorrar','1');
        }
        </script>

        It is supposed to show a modal window called PopUpmsg.aspx, where I'll answer Yes or No. That works fine. But after answering, I need to reload the page, and the postback does not seem to work.

        D Offline
        D Offline
        daveyerwin
        wrote on last edited by
        #3

        garfield185 wrote:

        if (Resp == True)

        should be

        if (Resp == true)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups