[Javascript] DHTML\AJax\WebParts\JavaScript

Peter Brunone peter at brunone.com
Thu Jan 22 14:03:44 CST 2009


That "I don't know" piece is probably just the ID of a control that 
contains the ascx.

The reference to the opener window will not be affected by the HTML around 
the script; the DOM isn't confused when you directly address "window" 
(unless you're inside a frame).

----------------------------------------

From: "Gene Berger" <list_mail at att.net>
Sent: Thursday, January 22, 2009 1:53 PM
To: "JavaScript List" <javascript at lists.evolt.org>
Subject: Re: [Javascript] DHTML\AJax\WebParts\JavaScript 

Thanks to all that replied. 

The problem with this was the web form is a web part (i.e. SharePoint) 
which
contains a User Control which the control is hosted in. I couldn't get a
reference to the control from "outside" of the form that contained the
control.

The correct syntax is:

WebPartManager1$gwpEdit_Project$Edit_Project$txt_DtG3_TargetDate

WebPartManager1 : The name of the WebPartManager
gwpEdit_Project : I actually have no idea what this is. It is
inserted by Microsoft upon screen generation.
Edit_Project : The name of the .ascx page
txt_DtG3_TargetDate : The ID of the control.

-----Original Message-----
From: javascript-bounces at lists.evolt.org
[mailto:javascript-bounces at lists.evolt.org] On Behalf Of Peter Brunone
Sent: Thursday, January 22, 2009 10:27 AM
To: JavaScript List
Subject: Re: [Javascript] DHTML\AJax\WebParts\JavaScript

Sounds like we'd really benefit from seeing the JS output (as opposed to 
the string-building code). FYI, window.opener is the proper syntax for 
getting a reference to the window which opened the current window.

One notable exception to the window.opener syntax is cross-domain 
scripting, i.e. when you're trying to send values between windows that have 

different sites open. Most current browsers will prevent you from doing so 

due to security concerns.

Peter

----------------------------------------

From: "Gene Berger" list_mail at att.net

Whoops ... 

I have tried the commented-out code. I can't seem to get a reference to 
the
calling web page to send back the value to the calling page. The 
JavaScript
errors I get are always along the line of "object is null or doesn't 
exist".
(The object being the parent window calling the popup.)

-----Original Message-----
From: javascript-bounces at lists.evolt.org
[mailto:javascript-bounces at lists.evolt.org] On Behalf Of Peter Brunone
Sent: Wednesday, January 21, 2009 4:34 PM
To: JavaScript List
Subject: Re: [Javascript] DHTML\AJax\WebParts\JavaScript

Gene,

Are you getting a Javascript error message? If so, what does it say? 
If not -- or even if so -- what does the Javascript look like when it's 
rendered in the HTML source?

I'm a little confused since most of the code here is commented out; 
what parts are actually relevant?

Peter

_______________________________________________
Javascript mailing list
Javascript at lists.evolt.org
http://lists.evolt.org/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at lists.evolt.org
http://lists.evolt.org/mailman/listinfo/javascript

 



More information about the Javascript mailing list