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. calendar popup not working in master page

calendar popup not working in master page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netvisual-studiotoolshelp
5 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.
  • R Offline
    R Offline
    regin
    wrote on last edited by
    #1

    am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will then be passed back to the main form and populate a textbox. it works fine. but when i used master page for all my pages and i put the textbox inside the content , the calender pops up but when i select the date nothing happens .. the textbox was not populated with the selected date from the calender and the window was not closed. Here is my code my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow. <!-- <!--Begin var a="i"; function newWindow() { a="i"; mywindow=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow.location.href='calendar.aspx'; } function update(day) { if(a=="i") { document.getElementById('txtidate').innerText=day; } if(a=="p") { document.getElementById('txtipdate').innerText=day; } } function MyWindow() { a="p"; mywindow1=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow1.location.href='calendar.aspx'; } //End--> in the calendarpopup window i have one caledar control and one button the code for that is.. protected void cldrdate_SelectionChanged(object sender, EventArgs e) { txtdate.Text = cldrdate.SelectedDate.ToShortDateString(); Session["date"] = cldrdate.SelectedDate.ToShortDateString(); } protected void Button2_Click(object sender, EventArgs e) { var MyArgs =document.getElementById('txtdate').value; window.opener.update(MyArgs); window.close(); } it was working properly before using with the master pages.. hw can i do it with masterpages...plz help </x-turndown>

    M I B 3 Replies Last reply
    0
    • R regin

      am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will then be passed back to the main form and populate a textbox. it works fine. but when i used master page for all my pages and i put the textbox inside the content , the calender pops up but when i select the date nothing happens .. the textbox was not populated with the selected date from the calender and the window was not closed. Here is my code my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow. <!-- <!--Begin var a="i"; function newWindow() { a="i"; mywindow=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow.location.href='calendar.aspx'; } function update(day) { if(a=="i") { document.getElementById('txtidate').innerText=day; } if(a=="p") { document.getElementById('txtipdate').innerText=day; } } function MyWindow() { a="p"; mywindow1=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow1.location.href='calendar.aspx'; } //End--> in the calendarpopup window i have one caledar control and one button the code for that is.. protected void cldrdate_SelectionChanged(object sender, EventArgs e) { txtdate.Text = cldrdate.SelectedDate.ToShortDateString(); Session["date"] = cldrdate.SelectedDate.ToShortDateString(); } protected void Button2_Click(object sender, EventArgs e) { var MyArgs =document.getElementById('txtdate').value; window.opener.update(MyArgs); window.close(); } it was working properly before using with the master pages.. hw can i do it with masterpages...plz help </x-turndown>

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      http://michaelsync.net/2006/11/06/aspnet-calendar-control-and-yahoouicalendar/

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      1 Reply Last reply
      0
      • R regin

        am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will then be passed back to the main form and populate a textbox. it works fine. but when i used master page for all my pages and i put the textbox inside the content , the calender pops up but when i select the date nothing happens .. the textbox was not populated with the selected date from the calender and the window was not closed. Here is my code my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow. <!-- <!--Begin var a="i"; function newWindow() { a="i"; mywindow=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow.location.href='calendar.aspx'; } function update(day) { if(a=="i") { document.getElementById('txtidate').innerText=day; } if(a=="p") { document.getElementById('txtipdate').innerText=day; } } function MyWindow() { a="p"; mywindow1=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow1.location.href='calendar.aspx'; } //End--> in the calendarpopup window i have one caledar control and one button the code for that is.. protected void cldrdate_SelectionChanged(object sender, EventArgs e) { txtdate.Text = cldrdate.SelectedDate.ToShortDateString(); Session["date"] = cldrdate.SelectedDate.ToShortDateString(); } protected void Button2_Click(object sender, EventArgs e) { var MyArgs =document.getElementById('txtdate').value; window.opener.update(MyArgs); window.close(); } it was working properly before using with the master pages.. hw can i do it with masterpages...plz help </x-turndown>

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

        Where have u coded javascript function? In master page or in content page? Best regard Pathan

        GOD HELP THOSE WHO HELP THEMSELVES

        R 1 Reply Last reply
        0
        • I Imran Khan Pathan

          Where have u coded javascript function? In master page or in content page? Best regard Pathan

          GOD HELP THOSE WHO HELP THEMSELVES

          R Offline
          R Offline
          regin
          wrote on last edited by
          #4

          i copied it in the content page.

          1 Reply Last reply
          0
          • R regin

            am using visual studio 2005express edition asp.net using c# and I am trying to create a popup calender so when a user click on a image on the main form, a calender will then popup, the user will select a date and the date will then be passed back to the main form and populate a textbox. it works fine. but when i used master page for all my pages and i put the textbox inside the content , the calender pops up but when i select the date nothing happens .. the textbox was not populated with the selected date from the calender and the window was not closed. Here is my code my main form i have 2 textboxs and 2 buttons to pick the date..for each button i have the script to cal the popup calendarwindow. <!-- <!--Begin var a="i"; function newWindow() { a="i"; mywindow=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow.location.href='calendar.aspx'; } function update(day) { if(a=="i") { document.getElementById('txtidate').innerText=day; } if(a=="p") { document.getElementById('txtipdate').innerText=day; } } function MyWindow() { a="p"; mywindow1=window.open('calendar.aspx','myname','resizable=no,width=400,height=300'); mywindow1.location.href='calendar.aspx'; } //End--> in the calendarpopup window i have one caledar control and one button the code for that is.. protected void cldrdate_SelectionChanged(object sender, EventArgs e) { txtdate.Text = cldrdate.SelectedDate.ToShortDateString(); Session["date"] = cldrdate.SelectedDate.ToShortDateString(); } protected void Button2_Click(object sender, EventArgs e) { var MyArgs =document.getElementById('txtdate').value; window.opener.update(MyArgs); window.close(); } it was working properly before using with the master pages.. hw can i do it with masterpages...plz help </x-turndown>

            B Offline
            B Offline
            baselanfouqa
            wrote on last edited by
            #5

            try to open viewsource and locate the id from (getElementbyid) you'll notice that its changed due to contentpage which something that asp.net do copy that id and replace it with foormal id and try it , it should work.

            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