Closed Thread Icon

Preserved Topic: control opener form (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8372" title="Pages that link to Preserved Topic: control opener form (Page 1 of 1)" rel="nofollow" >Preserved Topic: control opener form <span class="small">(Page 1 of 1)</span>\

 
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 11-01-2002 07:11

Howdy,

I have javascript that opens a new window, this window does some server side code, and then it is suppose to return a value to a form on the "opener" windows form. However, not working : ( Here is the code:

function ReturnVars() {
var win;
win=window.opener;
win.document.submitform.title.value = "testing";
}

You see, I am trying to access the form "submitform" on the "opener" window, but nothing is happening.
What is wrong?

Thanks,
Karl


karl@laketahoegymnasticscamp.com

[This message has been edited by Karl (edited 11-01-2002).]

[This message has been edited by Karl (edited 11-01-2002).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 11-01-2002 07:35

How odd, that should work.

Try alrting different thing to see if you can root out the problem. aybe a typo in somethng or... eh, anything.

alert(window.opener.document)

If you get an object alert then it's working, check the name of the form and and it's elements.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 11-01-2002 07:38

Thanks for the help... i'm in the process of trying to run down a typo. I have stripped my code down to nothing, and have even found sample code on the web (that works) that I'm duplicating that I can't get to work! I wonder if it could be something with my HTML or something...

Hmmm????



karl@laketahoegymnasticscamp.com

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 11-01-2002 23:02

Hi,
I'm lost for reasons why this isn't working. This line:
window.opener.document.stockForm.stockBox.value = t;
Is giving me the error:
Access not granted.

Is it because I am testing this on my desktop? The actual Javascript code and new window which is opened reside on the server, but the page which I am testing from is right on my desktop. Does that make a difference?

Karl


karl@laketahoegymnasticscamp.com

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 11-01-2002 23:05

That was it! Problem resolved.
Apparently, the window opener object can't refer back to a window which was instantiated from a users desktop.

Onword!!


karl@laketahoegymnasticscamp.com

« BackwardsOnwards »

Show Forum Drop Down Menu