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. window.showDialog

window.showDialog

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 Posts 2 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.
  • W Offline
    W Offline
    waheed awan
    wrote on last edited by
    #1

    in my cs file of the page i have added Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')"); this works quite gud................. lookup page opens as a dialog But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events.... why the dialog button opens web page instead of refreshing itself Thanx

    A 1 Reply Last reply
    0
    • W waheed awan

      in my cs file of the page i have added Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')"); this works quite gud................. lookup page opens as a dialog But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events.... why the dialog button opens web page instead of refreshing itself Thanx

      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      In the lookup page's design view give the below tag inside head tag. <base target="_self" /> Then try again.

      arun

      W 3 Replies Last reply
      0
      • A Arun Jacob

        In the lookup page's design view give the below tag inside head tag. <base target="_self" /> Then try again.

        arun

        W Offline
        W Offline
        waheed awan
        wrote on last edited by
        #3

        i did so but i still have the same problem........this donot solve it

        1 Reply Last reply
        0
        • A Arun Jacob

          In the lookup page's design view give the below tag inside head tag. <base target="_self" /> Then try again.

          arun

          W Offline
          W Offline
          waheed awan
          wrote on last edited by
          #4

          it works .........there was an error in my code due to which the statement was not working

          1 Reply Last reply
          0
          • A Arun Jacob

            In the lookup page's design view give the below tag inside head tag. <base target="_self" /> Then try again.

            arun

            W Offline
            W Offline
            waheed awan
            wrote on last edited by
            #5

            now i am facing another problem i open the dialog form Page1.aspx using LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write window.opener.document.getElementById('TextBox1').value='ads'; i get the error document.opener.document is null or not an object i have also tried window.opener.parent but it also gives error How can i do this

            A 1 Reply Last reply
            0
            • W waheed awan

              now i am facing another problem i open the dialog form Page1.aspx using LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write window.opener.document.getElementById('TextBox1').value='ads'; i get the error document.opener.document is null or not an object i have also tried window.opener.parent but it also gives error How can i do this

              A Offline
              A Offline
              Arun Jacob
              wrote on last edited by
              #6

              Instead of opener use window.dialogArguments. LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')"); Pass the value of textbox in place of null in the showModalDialog method(second argument).And then use window.dialogArguments from dialog.

              Arun J

              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