How to post the data to a new window and control the new window's property?

M

Matt

How to post the data to a new window and control the new window's
property?

When we submit the form data to another page, we usually do the
following:

<form action="display.asp" method="post"> will submit the form data
and open
display.asp in the current browser

<form action="display.asp" method="post" target="_blank"> will submit
the form data
and open display.asp in a new browser


Now, what I want is to open display.asp in a new browser, but control
the window's size,
and disable the status bar, title bar, and address bar of a new
browser.

If I do this, it can only open a html page, but not post the data to
display.asp.

window.open('display.asp', "newWin",
"scrollbars=0,menubar=0,toolbar=0,location=0,status=0");

any ideas? thanks!!
 
R

RobM

Matt said:
How to post the data to a new window and control the new window's
property?

When we submit the form data to another page, we usually do the
following:

<form action="display.asp" method="post"> will submit the form data
and open
display.asp in the current browser

<form action="display.asp" method="post" target="_blank"> will submit
the form data
and open display.asp in a new browser


Now, what I want is to open display.asp in a new browser, but control
the window's size,
and disable the status bar, title bar, and address bar of a new
browser.

If I do this, it can only open a html page, but not post the data to
display.asp.

window.open('display.asp', "newWin",
"scrollbars=0,menubar=0,toolbar=0,location=0,status=0");

any ideas? thanks!!

Greetings. I'll not mention design issues here, I know that's coming from
others here (put your seatbelt on, perhaps rightly *grin*). Technically, if
you have to do this - perhaps for an Intranet system where you know
JavaScript will always be available and window opening not disabled - as
you're already using JavaScript then you could easily get the form field
contents and add it to arguments after the "'display.asp'" e.g.
"'display.asp?arg1=frog&arg2=ostrich'". Wont be 'post'ed - 'get' but its a
way. You're data wont be going to your ASP server at this point though.

Cheers
Rob
 
T

Toby Inkster

RobM said:
you're already using JavaScript then you could easily get the form field
contents and add it to arguments after the "'display.asp'" e.g.
"'display.asp?arg1=frog&arg2=ostrich'". Wont be 'post'ed - 'get' but its a
way. You're data wont be going to your ASP server at this point though.

And if you do it carefully, you could even get it to work without
Javascript (albeit without any control of the new window). :)

But, yes, if you want to do this, you'll need GET, not POST.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top