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. PopUp Calendar problem

PopUp Calendar problem

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netdesignhelp
3 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.
  • S Offline
    S Offline
    SharonRao
    wrote on last edited by
    #1

    Hello Everyone, I have made a webform in asp.net 2005 with a calendar control, please see below for code. I have another webpage with hyperlink to popupcalendar page. The problem is the second page has a masterpage and when i click the hyperlink the popupcalendar is displayed but the date selected is not being transferred to the text box in the second page, It works fine if i remove the master page link from the second page, any ideas guys whats happening here. HTML CODE - Popup Calendar: <%@ Page Language="vb" AutoEventWireup="false" Inherits="KMAttendance.PopUp" CodeFile="PopUp.aspx.vb" %> PopUp

    VB CODE-popup calendar: Imports System.Web.UI.HtmlControls.HtmlGenericControl Namespace KMAttendance Partial Class PopUp Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'control.Value = Request("textbox") control.Valu

    J 1 Reply Last reply
    0
    • S SharonRao

      Hello Everyone, I have made a webform in asp.net 2005 with a calendar control, please see below for code. I have another webpage with hyperlink to popupcalendar page. The problem is the second page has a masterpage and when i click the hyperlink the popupcalendar is displayed but the date selected is not being transferred to the text box in the second page, It works fine if i remove the master page link from the second page, any ideas guys whats happening here. HTML CODE - Popup Calendar: <%@ Page Language="vb" AutoEventWireup="false" Inherits="KMAttendance.PopUp" CodeFile="PopUp.aspx.vb" %> PopUp

      VB CODE-popup calendar: Imports System.Web.UI.HtmlControls.HtmlGenericControl Namespace KMAttendance Partial Class PopUp Inherits System.Web.UI.Page Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'control.Value = Request("textbox") control.Valu

      J Offline
      J Offline
      Jay_se
      wrote on last edited by
      #2

      Hi, I believe Master Page is not a problem.

      SharonRao wrote:

      "window.opener.document.forms(0)." </blockquote> Here forms(0) may not represent your Master Page. Soln: Try Use, document.getElementById('') and Pass the ClientId of your server control (TextBox) to the Popup Calendar. Hopefully it works fine. <div class="ForumSig">Regards, <b>Jay</b> :)</div></x-turndown>

      S 1 Reply Last reply
      0
      • J Jay_se

        Hi, I believe Master Page is not a problem.

        SharonRao wrote:

        "window.opener.document.forms(0)." </blockquote> Here forms(0) may not represent your Master Page. Soln: Try Use, document.getElementById('') and Pass the ClientId of your server control (TextBox) to the Popup Calendar. Hopefully it works fine. <div class="ForumSig">Regards, <b>Jay</b> :)</div></x-turndown>

        S Offline
        S Offline
        SharonRao
        wrote on last edited by
        #3

        Hello, Thanks for the reply. I have changed the code in popupcalendar.aspx.vb,but it still is not working, any ideas where i have gone wrong. Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As System.EventArgs) Dim strScript As String = "document.getElementByID('txtstartdate')." + control.Value + ".value = '" strScript += calDate.SelectedDate.ToLongDateString strScript += "';self.close()" strScript += "</" + "script>" RegisterClientScriptBlock("Calendar_ChangeDate", strScript) End Sub <div class="ForumSig">Thanks in Advance for your help. Best Regards</div></x-turndown>

        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