Pop-up to a Pop-Up problem

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
0
shilpa
4/29/2009 1:42:21 PM
asp.net.client-side 24353 articles. 0 followers. Follow

5 Replies
1386 Views

Similar Articles

[PageSpeed] 55

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
0
shilpa
4/29/2009 5:10:05 PM

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

0
NC01
4/29/2009 5:27:25 PM

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
0
shilpa
4/30/2009 3:56:29 AM

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

0
NC01
4/30/2009 12:47:47 PM

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
0
shilpa
5/5/2009 6:27:53 AM
Reply:

Web resources about - Pop-up to a Pop-Up problem - asp.net.client-side

Is–ought problem - Wikipedia, the free encyclopedia
The is–ought problem in meta-ethics as articulated by Scottish philosopher and historian David Hume (1711–76) is that many writers make claims ...

The McLaren 570GT solves one of the biggest problems with supercars
VIDEO: McLaren's new supercar is optimised for long road trips.

Pope Francis' cardinal problem: an exit strategy for George Pell
After four days of forensic cross-examination by the royal commission, where he repeatedly pleaded ignorance about clerical sexual abuse, the ...

Trump: 'I guarantee you, there's no problem'
Donald Trump's penis size somehow becomes a topic of discussion as he hits back at Marco Rubio at what was meant to be the Republican presidential ...

Whiskey Tango Foxtrot and Hollywood's latest problem with whitewashing
The movie industry's structural racism appears to be as intractable as ever, with a new film accused of whitewashing.

VW execs didn't think diesel problem would be so serious
... , Emissions , Diesel Volkswagen admits that Martin Winterkorn received at least two memos advising him about the diesel emissions problem well ...

The problem of relabeling Trump as "Drumpf."
Many of those who seek to diminish Donald Trump have jumped at the idea of tagging him with the name Drumpf, which was the surname of his ancestors ...

Rubio: Anger, Fear Can Serve to Motivate Us But Will Not Solve Our Problems
Rubio: Anger, Fear Can Serve to Motivate Us But Will Not Solve Our Problems

The US Air Force is willing to spend $738 million to solve one of America's biggest rocket problems
For the last decade, Russian-made engines have been propelling US national security satellites into space. While this has proven to be a good ...

No Lundqvist, no problem: Raanta, Rangers beat Capitals
WASHINGTON (AP) — Antti Raanta made 32 saves while subbing for the injured Henrik Lundqvist and Derek Stepan scored as the New York Rangers bounced ...

Resources last updated: 3/6/2016 5:16:30 PM