How to open an new window and fill a form with predefined values?

O

Oliver Hoehle

Hello!

I want to open a new browser-window with javascript and fill some
input-fields in this window with predefined values. So the User does
not have to edit the input-fields manually but only has to submit the
form.

....
var childWindow = window.open("http://anyForm.html");
childWindow.document.getElementsByName('anyinputfield')[0].value='hello';
....

Unfortunately this does not work... Mozilla throws an error:

"Error: uncaught exception: Permission denied to get property
Window.PropertyIterator"

Is there any workaround?

Regards
Oliver
 
L

Lee

Oliver Hoehle said:
Hello!

I want to open a new browser-window with javascript and fill some
input-fields in this window with predefined values. So the User does
not have to edit the input-fields manually but only has to submit the
form.

...
var childWindow = window.open("http://anyForm.html");
childWindow.document.getElementsByName('anyinputfield')[0].value='hello';
...

Unfortunately this does not work... Mozilla throws an error:

"Error: uncaught exception: Permission denied to get property
Window.PropertyIterator"

Is there any workaround?

That would be a serious security breach, so no, you can't do it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top