how can I use window.opener but with window.showModalDialog instead of

Hi, I tried the code bellow that I found in  :  4guysfromrolla site:

the code displays a source page, whn I click on the Calendar <a href />  link  i get a calendar displayed on a target page. when I select a date, the calendar page closes and populates the textbox txtDate with the chosen date. Here is the code of the 2 pages and my question is down bellow:

a source page called frmCalendar.aspx has this:

<form name="frmCalendar">
   <input name="txtDate" type="text" />
   <a href="'/calendar.aspx?formname=frmCalendar.txtDate','calendar_window','width=154,height=188');calendar_window.focus()">

and the target form that includes the calendar control named calendar1 has this:

Private Sub Calendar1_SelectionChanged(sender As Object, e As EventArgs)
  Dim strjscript as string = "<script language=""javascript"">"
  strjscript &= "window.opener." & _
        Httpcontext.Current.Request.Querystring("formname") & ".value = '" & _
        Calendar1.SelectedDate & "';window.close();"
  strjscript = strjscript & "</script" & ">" 'Don't Ask, Tool Bug
  Literal1.Text = strjscript  'Set the literal control's text to the JScript code
End Sub

1/ I want to open the calendar as modal like:  window.showModalDialog instead of

when I do that, my code doesn t work any more. I get the calendar displayed, but when I select a date, all I get is a blank page instead of returning to my source   frmCalendar page.

2/ notice the code of the source frmCalendar page is in <form     >  without a runat=server.  my concern, what do  do when I want my text box that will be populated with a selected date inside a <form runat=server  >   how do I get my calendar working.

Thanks a lot.

Thanks a lot, I appreciate your taking the time to help me.
10/6/2006 12:48:53 AM 24353 articles. 2 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 27
Get it on Google Play
Get it on Apple App Store

You can send a reference to your window or any function or anything else you want as the second argument to showModalDialog.  Then you can grab it of the dialogArguments when your dialog loads via JS,
Does your team use the VSIP toolkit or maybe have the bulk of your app factored down to patterns and generators? Do you need in-house controls that will make your current vendors blush? If so, we need to talk.
10/6/2006 7:28:57 PM

I think that my problem in the sscript strjscript &= "window.opener." & _
        Httpcontext.Current.Request.Querystring("formname") & ".value = '" & _
        Calendar1.SelectedDate & "';window.close();"


is that:    window.close();  doesn t execute when iuse:  window.showModalDialog instead of



Thanks a lot, I appreciate your taking the time to help me.
10/9/2006 10:57:28 AM

Similar Artilces: and window.opener
Sorry for a really dumb post. I am not a scripting person... I find the whole thing a bit strange really with losely coupled types ect...Anyway, I am putting together a ASP.NET v2 application. One of the pages I am planning on implementing a link to open a pop-up window. In this popup window, the user will select the location of somthing, the window close and the value returned back to one of the parent browsers controls. I know this is not rocket science and I have done endless searches to try and find the answer. I am loading up the page and passing in the ClientID of the control I wish to...

Hi, can any eagle eyed geniuses spot what I'm doing wrong here? It's doing my nut! I'm simply trying to call a new page in a new window that I want to control the size, etc. I've tried two different ways - one from within my code behind and the other triggered by a LinkButton command action. Both do absolutely nothing. Please help... Private Sub InfoClick1(ByVal pSiteCode) Response.Write("<script>'siteinfo.aspx?sitecode='" & pSiteCode & "','Info','left=20,top=20,height=500,width=850,toolbar=no,status=no,resizable=1,scrollbars=no')</script>") End Sub +... in c# using RegisterClientScriptBlock opens window in minimized
Hello Friends I am developing web application using Win XP, IIS, C#, Sql Server etc. Now I have one button on to my web page when user click it, i do some operation on server side and then opens into a new window. So I have opened the window by using c#  and by RegisterClientScriptBlock.... But when it opens, it opens properly but get minimize to the taskbar. I wanted it to remain open or restore, So if anybody have an idea, Please let me know soon. My code to open new window..string script = String.Format("'ChildWindow.aspx',null,'height=550, ... to open very small window
Hi, in Loggedoutmsg.aspx i am just writing- "YOU HAVE LOGGED OUT"'Loggedoutmsg.aspx','Congrats',"location=0,status=0,scrollbars=0,width=300,height=1");  I want to open window just to show this line. But the window which gets opened by above code has hight more than necessary. Even when i specified height=1,its size not decreasing to show just one line .How can i do this? Please Mark the post as "ANSWER" if it helps you Answered here: NC...   Heres something fro...

opening new window other than
is there any other way of opening a new window... aside from has a memory leak so i want to prevent using it as much as possible.Alvin ShihSoftware DeveloperMCP MCTS MCPD Hi window.showmodaldialog() but supports only IE....   Regards Suresh Kumar Goudampally Why dont you avoid pop up windows all together and use an iframe that is positioned over the content? Eric | Twitter epascarello | LinkedIn Hi,Try Target="_blank" N.P.SenthilSoftware Engineer  Link buttons targer property is set to "_blank"...

maximize a window opened by
hi I want to allow the user to maximize the window opend by method sued in a ajax update panel ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "NewClientScript", "'help.aspx?','Report', 'width=500,height=400 ,top=210,left=505, scrollbars=yes');", true); Just have a look for this link it will give you all details in   ...

Open a new window with
Hi, =20 in our web application, we try to open a popup-window with But instead of opening a new window, a new tab is opened. =20 In the SeaMonkey preferences, we configured it, to open new links in a new tab. With firefox, we had the same preferences, but when was called, a new window was opened.=20 How can we configure SeaMonkey, so that it has the Firefox behavior when calling ? =20 Thanks in advance. =20 =20 =20 Artur Zeiler schrieb: > Hi, > > in our web application, we try to open a popup-window wi... and window.opener problem
 Hi,I have written the following javascript to pop up a windowIn the parent page: function PreMail()     {"http://localhost:2704/WebSite3/popup1.aspx","popup1","height=50,width=300,left=500,top=400,status=no,toolbar=no,menubar=no,location=no");    }  and the button:<asp:Button ID="bt1" runat="server" OnClick="Button1_Click"  OnClientClick="PreMail()" Style="left: 45px;         &...

How to open url in new window and use previous window when already opened
We can achieve this by using a simple javascript function....     var WindowObjectReference; function openRequestedSingleWindow(strUrl, strWindowName) {     if(WindowObjectReference == null || WindowObjectReference.closed)    {      WindowObjectReference =, strWindowName);    }    else    {      WindowObjectReference.focus();    } } Here we use a WindowObjectReference as a global variable to track the opened window. If opened for the fir...

automatically adjusting the new window size opened using
i am using javascript method specifying the height and width of the new window. but the problem is the contents are bit bigger than that, they will be invisible and if they are less, there will be blank white screen which doesn't look very good. so is it possible to adjust the size of new window automatically depending upon the content?-keeara g------------------ Hi keeara, Use window.resizeTo(iWidth, iHeight). Cheers, Peter BrunoneMS MVP, ASP.NETFounder, EasyListBox.comDo the impossible, and go home early. but can i access it by server side code? i am using vb.n... opens new window
Firefox 19.0 Windows XP Pro SP-3 Example site URL: (I've hit this problem at many sites, however.) Firefox is configured (enabled) as: Tools -> Options -> Tabs "Open new windows in a new tab instead" = Enabled Presumably this means when a page tries to open a new window (another instance of the web browser) that instead a new tab will appear in the current window. Works that way in IE8 (when "Always open popups in a new tab" is enabled). Go down the page and click on the "Site Help" link. What I get...

superreview granted: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 316692] BrowserOpenTab() even when no windows are open <> has granted Stefan <>'s request for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open Attachment 316692: BrowserOpenTab() even when no windows are open ...

superreview requested: [Bug 429926] Make Cmd+T open a new window when no browser windows are open : [Attachment 316692] BrowserOpenTab() even when no windows are open
Stefan <> has asked <> for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open Attachment 316692: BrowserOpenTab() even when no windows are open ...

Can add a parameter to set up popup windows as a modal windows?
Can add a parameter to set up popup window as a modal window? I want to open modal popup window to display a image. Try this..  window.showModalDialog("http://localhost/Test.aspx", "center:yes;resizable:no;dialogHeight:300px");My Blog"Don't be afraid to be wrong; otherwise you'll never be right." Hi, Do you want to show images? try this alternative: Any doubt, post your comment.Segundo Serrano P.Ing. Sistemas  ...

Web resources about - how can I use window.opener but with window.showModalDialog instead of -

Chrome’s Lack of Support for showModalDialog Breaks Some Enterprise Web Apps
Google Chrome no longer supports window.showModalDialog, breaking several enterprise apps such as OWA, EAC, SAP, and others.

KB941644 and Event ID 4226 patch
David Kaspar The Story of David Kaspar

Tags - Web development blog, news and tutorials - Developer Drive
Home Categories Popular Categories C# CSS Dart HTML HTML5 J2EE See all categories » Tags Popular Tags HTML JavaScript CSS PHP Cascading Style ...

Google releases Chrome 37 for Windows, Mac, Linux
Google has released Chrome 37 for Windows, Mac, and Linux. The biggest change affects only Windows users, in the form of DirectWrite support ...

Issues - selenium - Browser automation framework - Google Project Hosting
My favorites ▼ - Sign in selenium Browser automation framework Project Home Downloads Wiki Issues Source New issue Search Search within: All ...

Chrome 37 Beta Supports Microsoft's DirectWrite API, Will Render Cleaner Fonts
Google released the latest beta version of its Chrome browser today, and if you're a Windows user on a machine that runs at least Vista, fonts ...

A Workaround For An Outlook Web App Problem With Chrome And Modal Popup Dialogs
Well, it turns out that the showModalDialog.js fix is not as complete as hoped. I'm going to suggest another temporary fix while I have another ...

Chrome for Windows Finally Getting Sharp, Clean Fonts
... of the dialog HTML5 element, which allows users to code dialog boxes for web apps and adjust them with a JavaScript API. The old method, showModalDialog, ...

Problem with IE11 and nested Modal Dialog after applying KB3008923
... update KB3008923, dialogArguments are 'undefined' when displaying over an existing modal. For example, if you load a page with window.ShowModalDialog ...

THE MOBILE FIRST NETWORK WMPowerUser Microsoft News gdgt arena forums Navigate Home Windows 10 Office 365 Xbox azure Apps deals Contact About ...

Resources last updated: 12/14/2015 5:04:15 AM