Javascript to open a new url


I am not sure if this is possible but i need some javascript that will generate a http request with some content fields, and then open the requested url in the current window.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
On this page , see "Open a new window and control its appearance".  You can add a query string to the end of the URL to pass parameters.
soozhCEOAuthor Commented:
ok but i want to add CONTENT fields - not query string,
Dave BaldwinFixer of ProblemsCommented:
Content is sent in a URL with a query string in name/value pairs.  Can you give me an example of what you want to send?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

soozhCEOAuthor Commented:
i do not want my data in the url.  Thats why i want to pass it as part of the body of the message...
Dave BaldwinFixer of ProblemsCommented:
There is no "body of the message" when you open a web page.  Your choices are limited to two: GET which puts the data in the URL, and POST which does not.  In both cases, the data has to be supplied in "name/value" pairs like you see at the end of internet addresses in your address bar.  Which form you use depends on the requirements of the web site.  You have to send the data in the form that they require.  Do you have directions from them about what they want you to do?  Can you give me the web address that you are trying to open?
soozhCEOAuthor Commented:
I would like to do a post.  And add content fields that are not in the url...

do you have any generic code?
Dave BaldwinFixer of ProblemsCommented:
See here:  For POST, you need to use a <form> with a 'target' attribute of '_blank'.  The page that you POST the data to must be a server side page that can receive the data.  A plain HTML page can not do that.
soozhCEOAuthor Commented:
Ok i have looked at this example.  

The reason i posted this question here is because i know nothing about get/post blah blah...

I know the question is a very basic one and anyone who has more than 5 mins experience with html/js can do it... but thats not me.

So really i would like an example that does not send the data as name/value pairs in the url.

Dave BaldwinFixer of ProblemsCommented:
This page shows an example of using POST to go to a new page.  If you are going to transfer data on the web, you need to spend your "5 mins" to learn about GET/POST and forms.  They are the defined ways of transferring info from one page to another.  The pages I have linked can tell you everything you need to know.
soozhCEOAuthor Commented:
I am sorry but my question has not been answered.  I have asked for some example JS code because i dont know anything about it.  

It is becoming increasingly common that people answer questions by refering to a link that often does 85% of what you want.

I can search the web... but the reason i have posted the question here is because i only ever find 85% of my solution....
Dave BaldwinFixer of ProblemsCommented:
Your question, as you have asked it, is not answerable because what you are asking for does not exist.  You have not given me any examples of what you think you want so I don't see how I can give you sample code to show you what to do.  I have a hundred pages on the web that POST info to other pages so I know how to do it.  But until you give me enough information, I can not answer your question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.