473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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('anyinputfi eld')[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
Jul 23 '05 #1
1 3570
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('anyinputf ield')[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.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rob Wahmann | last post by:
I'm having trouble with the following code appending the form name and an empty value to the end of the url. Can anyone tell me what's wrong? I appreciate any tips or advice you can pass along! ...
8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
5
by: mike | last post by:
Is there any way I can change the content type when I open a new window other than opening a script in the open statement? mywin =...
3
by: Stephen V | last post by:
Can anyone help me out with this problem. I would like to redirect/ go to another php page when my SQL insertion is done and also send a variable at the same time. the idea is, to come on my...
3
by: harikrishnan.kamalakannan | last post by:
Hi, When a open an asp page from a modal window through window.open, my session values of parent(the screen that invoked the modal window) are lost. Please this is urgent.
7
by: Bill Nguyen | last post by:
This has been posted before but received no response: I need to arrange window screens on the total area of a mulitple-mopnitor desktop. As an example, below is the bound info for my 2-monitor...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.