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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. pop-up

pop-up

Scheduled Pinned Locked Moved ASP.NET
9 Posts 4 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.
  • P Offline
    P Offline
    Priya S
    wrote on last edited by
    #1

    i would like to open calendar control in a pop-up window when user clicks a button. :confused:

    Thanks&Regards, Priya.

    C N 3 Replies Last reply
    0
    • P Priya S

      i would like to open calendar control in a pop-up window when user clicks a button. :confused:

      Thanks&Regards, Priya.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      OK - well, there are a ton of javascript calendar controls on the web, why not just use one ?

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      P 1 Reply Last reply
      0
      • C Christian Graus

        OK - well, there are a ton of javascript calendar controls on the web, why not just use one ?

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        P Offline
        P Offline
        Priya S
        wrote on last edited by
        #3

        please let me know one javascript which makes that calendar control to pop-up in new window/form.:|

        Thanks&Regards, Priya.

        C N 2 Replies Last reply
        0
        • P Priya S

          please let me know one javascript which makes that calendar control to pop-up in new window/form.:|

          Thanks&Regards, Priya.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Which calendar control ? There are tons of them around, and they generally encapsulate all the javascript code that causes them to act as popups, etc. Often, the 'popup' is in fact a div on the page, but that is irrelevant. You can just download a control and use it.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          1 Reply Last reply
          0
          • P Priya S

            please let me know one javascript which makes that calendar control to pop-up in new window/form.:|

            Thanks&Regards, Priya.

            N Offline
            N Offline
            nandhububbly
            wrote on last edited by
            #5

            Hi u create one child aspx page for calender ok.. copy this code in to page_load of parent .aspx.cs page btncalender is button btnCalendar.Attributes.Add("onclick", "new_window('calendar.aspx')"); -------------------------------------------- copy bellow code to in .aspx this java script function function new_window(url) { var argArray = new Array(); popupWin = window.open(url,"",'dialogTop:100px;DialogLeft:150px;DialogHeight:625px;DialogWidth:850px;scrollbars:YES;menuBar:0;status:no;center:Yes;unadorned:Yes;resizable:No;scroll:No;Help:No'); window.top.name = 'opener'; } first complete this in parent page after that reply to me i will send next process

            1 Reply Last reply
            0
            • P Priya S

              i would like to open calendar control in a pop-up window when user clicks a button. :confused:

              Thanks&Regards, Priya.

              N Offline
              N Offline
              nandhububbly
              wrote on last edited by
              #6

              Hi u create one child aspx page for calender ok.. copy this code in to page_load of parent .aspx.cs page in code behind btncalender is button btnCalendar.Attributes.Add("onclick", "new_window('calendar.aspx')"); -------------------------------------------- copy bellow code to in .aspx this java script function in HTML page function new_window(url) { var argArray = new Array(); popupWin = window.open(url,"",'dialogTop:100px;DialogLeft:150px;DialogHeight:625px;DialogWidth:850px;scrollbars:YES;menuBar:0;status:no;center:Yes;unadorned:Yes;resizable:No;scroll:No;Help:No'); window.top.name = 'opener'; } first complete this in parent page after that reply to me i will send next process

              P 1 Reply Last reply
              0
              • N nandhububbly

                Hi u create one child aspx page for calender ok.. copy this code in to page_load of parent .aspx.cs page in code behind btncalender is button btnCalendar.Attributes.Add("onclick", "new_window('calendar.aspx')"); -------------------------------------------- copy bellow code to in .aspx this java script function in HTML page function new_window(url) { var argArray = new Array(); popupWin = window.open(url,"",'dialogTop:100px;DialogLeft:150px;DialogHeight:625px;DialogWidth:850px;scrollbars:YES;menuBar:0;status:no;center:Yes;unadorned:Yes;resizable:No;scroll:No;Help:No'); window.top.name = 'opener'; } first complete this in parent page after that reply to me i will send next process

                P Offline
                P Offline
                Priya S
                wrote on last edited by
                #7

                finished with that process, now what shud i do, to open in new window:confused:

                Thanks&Regards, Priya.

                I 1 Reply Last reply
                0
                • P Priya S

                  finished with that process, now what shud i do, to open in new window:confused:

                  Thanks&Regards, Priya.

                  I Offline
                  I Offline
                  Imran Khan Pathan
                  wrote on last edited by
                  #8

                  try this Javascript function popup(val) { ref = "calc.aspx?id="+val; var strFeatures="toolbar=no,status=no,menubar=no,location=no" strFeatures=strFeatures+",scrollbars=no,resizable=no,addressbar=no,height=250,width=220" newWin = window.open(ref,"TellObj",strFeatures); newWin.opener = top; } Create one page and named it calc.aspx and put calendar control In code behind file of calc.aspx.cs write belove code to get value in textbox string val; protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null) val = Request.QueryString["id"].ToString(); } protected void Calendar1_SelectionChanged(object sender, EventArgs e) { if(String.IsNullOrEmpty(val)) Response.Write("opener.document.getElementById('txtSearchStartDate').value='" + Calendar1.SelectedDate.ToShortDateString() + "'; self.close();"); else Response.Write("opener.document.getElementById('"+val+"').value='" + Calendar1.SelectedDate.ToShortDateString() + "'; self.close();"); } Now call javascipt and open popup window on click of link. [Calendar](javascript:;) best Regard pathan ---------------------------------------------------

                  1 Reply Last reply
                  0
                  • P Priya S

                    i would like to open calendar control in a pop-up window when user clicks a button. :confused:

                    Thanks&Regards, Priya.

                    N Offline
                    N Offline
                    nandhububbly
                    wrote on last edited by
                    #9

                    Hi next here u copy and past in to ur child page but u create calender , 2click ur calendar in code behind u past this .and i mention below code one line u give ur parent page name so c that line and give ur parent page name protected void Calendar1_SelectionChanged(object sender, EventArgs e) { foreach (DateTime dt in Calendar1.SelectedDates) { Session["Date"] = dt.ToString("dd/MM/yyyy"); Page.RegisterClientScriptBlock("CloseWindow", "window.opener.document.forms[0].submit();window.close(); "); Page.RegisterStartupScript("parentwindow", "window. opener.location.href = 'here give ur parentpage.aspx'; "); } } } after that before msg i sent one line for parent page in code behind u should past that line as bellow protected void Page_Load(object sender, System.EventArgs e) { if(!Page.IsPostBack) { btnCalender.Attributes.Add("onclick","new_window('childpage.aspx');"); Session["Date"]=null; } if(Session["Date"]!= null) { TxtBox1.Text=Session["Date"].ToString();// note TxtBox1.Text is in which txtbox u need to copy the date that box } its works good Thanks and Reg nandha

                    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