Subject: post a http request/response in new window nomenu
Posted By: dfarkish Post Date: 9/20/2003 12:51:31 AM
Hello,
I need to post a http request and have the response come back in a new window. I have tried the target attribute in the form element to open a new window for the response and it works. However I prefer to not have the menu bar/status bar in the new window. How should I specify these attributes for the new window? I would appreciate your responses.
Thank you.
Reply By: joefawcett Reply Date: 9/22/2003 8:07:54 AM
You must open the new window first using the window.open method and include a name as the second parameter. Use this anme as the target attribute.

--

Joe
Reply By: dfarkish Reply Date: 9/22/2003 3:17:16 PM
Thank you for your response.  When I open a new window what should I put for the first parameter (which is the name of some document)?

I could use the window.open instead of target attribute of form element, however then the request becomes a http "get" and there are some rules in the project that I work for that does not allow a http "get" request to come in.
Thank you.


Reply By: joefawcett Reply Date: 9/23/2003 10:30:01 AM
The first argument can be an empty string. I don't understand the second question. Instead of a submit button have a normal button with its onclick set to doFormPost():

function doFormPost()
{
  var oNewWin = window.open("", "newTarget", "");
  while(!oNewWin.document)
  {
    //Wait for window to open
  }
  document.forms[0].submit();
}

Your form would have the target attribute set to "newTarget".

--

Joe

Go to topic 4417

Return to index page 1040
Return to index page 1039
Return to index page 1038
Return to index page 1037
Return to index page 1036
Return to index page 1035
Return to index page 1034
Return to index page 1033
Return to index page 1032
Return to index page 1031