window.open 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 update in the URL (field). I then try and get the value back, update it and close.

 

var lblToUpdate = window.opener.window.document.getElementById(Request.QueryString["field"]);
lblToUpdate.innerHTML = '"Hi, Its me"';
  

However when I try and get the reference to the control I get a scripting error 'Request' is undefined. What am I doing wrong? and where is there a decent set of JScript documentation?

Any help apreciated. 

Regards, Richard Thurbin



 

 

0
rthurbin
3/9/2007 9:14:46 AM
asp.net.client-side 24353 articles. 1 followers. Follow

1 Replies
1403 Views

Similar Articles

[PageSpeed] 59

My lucky forum...

 

Managed to work out that a) I need to get the Request.QueryString in c# and not Java and b) form1 for your <form id=form1> tag doesnt mean it is form1 on the client side so use form[0] instead and c) txtSomthing.Text in c# is txtSomthing.value on the client.

Oh and make sure everything is in a stupid random case, but knowone will tell you which case to use.

0
rthurbin
3/9/2007 10:08:11 AM
Reply:

Similar Artilces:

Open a new window with window.open()
Hi, =20 in our web application, we try to open a popup-window with window.open(). 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 window.open() was called, a new window was opened.=20 How can we configure SeaMonkey, so that it has the Firefox behavior when calling window.open() ? =20 Thanks in advance. =20 =20 =20 Artur Zeiler schrieb: > Hi, > > in our web application, we try to open a popup-window wi...

maximize a window opened by window.open()
hi I want to allow the user to maximize the window opend by window.open() method sued in a ajax update panel ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "NewClientScript", "window.open('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 window.open() http://www.javascript-coder.com/window-popup/javascript-window-open.phtml   ...

window.open and window.opener problem
 Hi,I have written the following javascript to pop up a windowIn the parent page: function PreMail()     {       window.open("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;         &...

opening new window other than window.open
is there any other way of opening a new window... aside from window.open? window.open 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 Pascarello.com | Twitter epascarello | LinkedIn Hi,Try Target="_blank" N.P.SenthilSoftware Engineer  Link buttons targer property is set to "_blank"...

window.open to open very small window
Hi, in Loggedoutmsg.aspx i am just writing- "YOU HAVE LOGGED OUT"newwin=window.open('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: http://forums.asp.net/t/1308177.aspx NC...   Heres something fro...

window.open() opens new window
Firefox 19.0 Windows XP Pro SP-3 Example site URL: http://www.pcconnection.com/ (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...

how can I use window.opener but with window.showModalDialog instead of window.open
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=&q...

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
neil@parkwaycc.co.uk <neil@httl.net> has granted Stefan <stefanh@inbox.com>'s request for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=429926 Attachment 316692: BrowserOpenTab() even when no windows are open https://bugzilla.mozilla.org/attachment.cgi?id=316692&action=edit ...

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 <stefanh@bluebottle.com> has asked neil@parkwaycc.co.uk <neil@httl.net> for superreview: Bug 429926: Make Cmd+T open a new window when no browser windows are open https://bugzilla.mozilla.org/show_bug.cgi?id=429926 Attachment 316692: BrowserOpenTab() even when no windows are open https://bugzilla.mozilla.org/attachment.cgi?id=316692&action=edit ...

OPEN NEW WINDOW USING window.open
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>window.open('siteinfo.aspx?sitecode='" & pSiteCode & "','Info','left=20,top=20,height=500,width=850,toolbar=no,status=no,resizable=1,scrollbars=no')</script>") End Sub +...

Changing the opening window url from the opened window
Hi. I would like to create the following process: The current window the user is in will open another window using the javascript window.open method. In the opened window, when I click a certain link, which is set dynamically using vb.net code, the original window (the opener) will be redirected to the url that was set in the link. How can I do this ? Thanks in advance. check related postshttp://www.experts-exchange.com/Web/WebDevSoftware/UltraDev/Q_20754699.html  http://lists.evolt.org/pipermail/javascript/2003-March/004689.html If this post was useful to you, pl...

Open Popup Window and Close the window that Opened it
I'm using some code that I found on this site to open a Popup window with a Button Click for a Crystal Report: Dim PopUpScript As String = "<script language='javascript'>" + "window.open(" & Chr(39) & strExportFile & Chr(39) & ");</script>" Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopUpWindow", PopUpScript, False) After the Popup Window shows the Report I would like to close the window that opened this popup window.  Thanks, Mark just add window.close(); in Dim PopUpScript As String ...

Opening response window in main window open event...
I'm opening a response window in a main windows open event. The halts all further processing in the main windows open event until the response window is closed. However, this seems to alter the callstack so that the selectionchanged events in tab-pages on the main window is fired *before* the script following the open() function is executed! I can't figure out whether this is a bug or Windows default behaviour... PB 9.0.1, Windows XP 5.1.2600 TIA Andre Want code? Got code: .... type w_main from window (main!) event open; open( w_resp ) // <-- Breakp...

what is difference between window.opener.PageReload() and window.opener.ReloadPage()
what is difference between window.opener.PageReload() and window.opener.ReloadPage() rupeshs:what is difference between window.opener.PageReload() and window.opener.ReloadPage()  There is no difference only one similarity , that none of the two exists.SHASHANK BHIDECAPGEMINI INDIA"THE ROAD TO SUCCESS IS ALWAYS UNDER CONSTRUCTION MARK MY RESPONSE AS ANSWER TO HELP ME BUILD IT :)" As far as I know, there are no methods such as PageReload or ReloadPage. If you are using pure JavaScript, there is a reload() method which you can call. Try window.opener.location.reload() inste...

Web resources about - window.open and window.opener - asp.net.client-side

Window - Wikipedia, the free encyclopedia
This article is about the part of a building. For the Microsoft operating system, see Microsoft Windows . For other uses, see Window (disambiguation) ...

Microsoft Windows Information, Solutions, Tools - Windows IT Pro
Microsoft Windows information and solutions for IT pros. Topics include cloud computing, Windows Server, Exchange, Outlook, PowerShell, virtualization, ...

The Windows Blog
The Windows Blog is Microsoft's Official Blog for the Windows Operating System.

WordPress.com app now available for Windows
... management system, also wants to give users a more focused tool for the job. So, in late-November, it announced dedicated apps for Windows, ...

Microsoft has a master plan with its Cortana digital assistant and Windows 10
Microsoft is working on putting Cortana, its Siri-like personal digital assistant, anywhere and everywhere within Windows 10, reports The Verge ...

It lives! Volunteers from Microsoft release open-source fork of Windows Live Writer
A group of Microsoft engineers today made good on a June promise and released an open-source version of the venerable Windows Live Writer, a ...

Windows 7 now supports the Xbox One wireless controller adapter
... dropping $25 on one of those wireless adapters for PC so I can use it beyond just Xbox gaming. But I haven't. Not yet! I'm still on Windows ...

Uber upgrades Windows app with Cortana, desktop support
... anytime, but what if you're sitting at a desktop PC? Well, now you can do it there, too. Uber announced today that it used the Universal Windows ...

Apple Products Outshine Windows, Android in Enterprises, Survey Shows
This slide show looks at how enterprises are embracing Apple computer products, and why IT professionals see great value in their use by employees. ...

As Apple Slowly Starts Adopting Carrier Billing, Microsoft Follows On With Integration For All Windows ...
Terry Myerson, executive vice president of operating systems at Microsoft (Photo by Andrew Burton/Getty Images) Apple has begun trying out carrier ...

Resources last updated: 12/11/2015 10:49:32 PM