Click to See Complete Forum and Search --> : Performing submit() on a child window


geuis
05-27-2003, 07:01 PM
I am trying to write a script that will trigger a submit() on a form in another window. I'm not sure what's wrong with the code I've written, but it always tells me permission denied. I've tried to follow the DOM as best I know how, but it still won't work. Any help is really appreciated.

p.s. the url in the window.open() is not the actual URL I am trying to get to submit, simply a placeholder. The website its trying to access has only 1 form that is unnamed, so should be accessible from forms[0].submit();

<html>

<script language="Javascript">

function test()
{

var newWin=window.open("http://somesite.com");

newWin.document.forms[0].submit();


}

</script>

<body onload="test();">
</body>

<html>

geuis
05-27-2003, 07:39 PM
The html page holding the script is stored locally on the user's hard-drive. The webpage it is accessing is on our company's internal web server, so the URL is in the form of "http://abc/thepage.html"
Is this considered not to be in the same domain? And if so, is there a way to do what I need to do?

khalidali63
05-27-2003, 08:12 PM
Nope,I don't think I have seen a solution to this,trying to over come this honestly,is just another effort to hack a webservers resources...

:D

geuis
05-28-2003, 01:12 PM
Since I am attempting to write this utility for only a few of our employees to use over our intranet, this may work well for us. Reconfiguring IE won't be a problem. What options in IE do I need to change to allow the cross-domain scripting to happen? Thanks for your help. Its great.