This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Submitting a pop-up window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Submitting a pop-up window" Watch "Submitting a pop-up window" New topic

Submitting a pop-up window

sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
I am developing a struts application in which opening a new window through java script. I want to write few content to this new window and the SUBMIT it.

I am succeeded till writing contents to this new window but not able to submit it. My code reads,

function openNewWindow()
myWindow ="\popupWindow.html", "tinyWindow", 'toolbar,width=150,height=100')
myWindow.document.write("Welcome to this new window!")

Does window.submit() works? please advice.(I know contents on this new wondow will be not be visible but thats my requirement....this is just for populating my ActionForm)
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9930

You are supposed to submit a form and not a window.

[My Blog] [JavaRanch Journal]
sachin pachpute
Ranch Hand

Joined: Aug 05, 2004
Posts: 35
Thanks a lot, I made a chande "myWindow.document.forms[0].submit();" and it worked
I agree. Here's the link:
subject: Submitting a pop-up window
Similar Threads
Display results in a popup window
Printing the contents of a JSP....
display contents of a text file in a new window
input from a new window
Opening Windows