Hello EveryOne,
I have a web Form. It will open a Pop-Up on a button Click. Code for this is,
btnAddStaff.Attributes.Add("onclick", "javascript:ShowDialog('" + applicationPath + "/Lookups/StaffDetails.aspx" + "', '" + UIConstants.WINSETTINGS_XL + "')");This POPUP has to open another POPUP, it is bound like this, on Button btnDOB Click(this opens calender)
btnDOB.Attributes["onclick"] = "javascript:ShowDialog('" + applicationPath + UIConstants.CALENDAR_LOOKUP_DIALOG + "?CurrentSelectedDate=" +txtDOB.Text + "', '" + UIConstants.WINSETTINGS_CALENDAR + "', '" + txtDOB.ClientID + "')"; It is not opening, It casts an exception telling Object Expected.But that is not the case, as from WebForm->Button btnDOB Click, opens the popup in expected manner, but from a popup -> Button btnDOB Click not opening Calender
plz help me
Warm Regards,
Shilpa pradeep
![]() |
-1 |
![]() |
Hello all,
Let me simplify what i wrote. I am facing problem in showing a pop up calender.
Scenario,
Form has a button1->opens a pop up popup1 using javascript's showdialog(). Popup1 has a button2. On click, should open a calender pop up. This pop up too i tried using Showdialog(), but calender is not coming.
So can i open this calender pop up? Any one please help me.
Warm Regards,
Shilpa pradeep
![]() |
-1 |
![]() |
Exactly what is UIConstants.CALENDAR_LOOKUP_DIALOG and UIConstants.WINSETTINGS_CALENDAR? Remember that we can't see your code nor tell what these things are doing.
I've opened many popups within popups before. I suspect that your problem has to do with file paths, include files, or some such.
NC...
![]() |
-1 |
![]() |
Hello NC01,
UIConstants.CALENDAR_LOOKUP_DIALOG = "/Lookups/Calendar.aspx"
this is File path, &
UIConstants.WINSETTINGS_CALENDAR ="dialogHeight: 256px; dialogWidth: 226px; center: Yes; resizable: No; status: No; scroll: No; help: No;"
;-> this specifies size of pop up dialog.
You mentioned that "I've opened many popups within popups before", how you achieved it? Did you use showdialog() methos of javascript for multi-level pop up? Please reply as soon as possible.
Warm Regards,
Shilpa pradeep
![]() |
-1 |
![]() |
shilpa.gururao:
UIConstants.CALENDAR_LOOKUP_DIALOG = "/Lookups/Calendar.aspx"this is File path, &
That is probably your problem as that specifies that the Calendar.aspx file is in a sub-folder named Lookups IN the SAME folder that the page that is using it is on.
shilpa.gururao:
You mentioned that "I've opened many popups within popups before", how you achieved it? Did you use showdialog() methos of javascript for multi-level pop up? Please reply as soon as possible.I don't use window.showModalDialog to open popups because, until the recent release of Firefox anyways, that only works in Internet Explorer. I use window.open exclusively, but the URL to the page being opened has to be correct in any case.
Here's an easy example:
Add a property to the page:
protected string CalendarFileUrl
{
get
{
object viewState = this.ViewState["CalendarFileUrl"];if ( viewState == null )
{
string qualifiedFilename = "Lookups/Calendar.aspx";// If the file is in a sub-folder named "SubFolder" which is located inside the application virtual, use this::
// (file is at: "http://server-name/app-virtual/SubFolder/SomeFile.aspx")
//string fileUrl = string.Format("{0}{1}/{2}",
// this.Request.Url.GetLeftPart(UriPartial.Authority),
// this.Request.ApplicationPath,
// qualifiedFilename);// If the file is in a sub-folder named "SubFolder" which is located on the root of the web site, use this:
// (file is at: "http://server-name/SubFolder/SomeFile.aspx")
string fileUrl = string.Format("{0}/{1}",
Page.Request.Url.GetLeftPart(UriPartial.Authority),
qualifiedFilename);viewState = fileUrl;
}return (string)viewState;
}
}then instead of UIConstants.CALENDAR_LOOKUP_DIALOG use CalendarFileUrl.
NC...
![]() |
-1 |
![]() |
Thanks for replying NC01
where this property to be coded? Where it should be assaigned? I am not very clear please clarify me.
Warm Regards,
Shilpa pradeep
![]() |
-1 |
![]() |