Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters in URL with Post Method

Status
Not open for further replies.

TStriker

Programmer
Nov 12, 2003
277
US
Hi all,

I have a database where I house information about different things. I would like to create a button that will launch IE and populate the URL with data from the fields of the current record. Something like this:


The fields in the database are:

sku and dt with the values being 123456 and 062806 respectively.

I can easily construct the URL and make it work on sites using the GET method but the problem is that the site I'm interested in is using the POST method. Is there anyway to make this work?

-Striker
 
Thank you sir!

I'm sorry to say that I'm too green to understand exactly. What would the URL look like?

-Striker
 
Hmmm, okay. I was afraid that was the answer.

Was "foam" talking about having the DB software build a webpage on-the-fly using hidden inputs and then pass it along to the destination page?

-Striker
 
er, no
I don't think so anyway.

Can you restate your problem?

The way I understood it was that you had a webpage and you wanted to provide a button that the user could click.
When they clicked the button they would be taken to another page and some data would also be passed to the new page without showing up in the URL?

When you say you "have a database" and want to "create a button" do you mean that you wish to create a button within the database application or on a webpage that created using data from the database?

If it's the latter, create your page and put the data you wish to "post" into hidden form fields. The "button" then becomes the "submit" button for this form. When a user presses the button the data will be "posted" to the new page and can be retrieved with a server side scripting language.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
Yeah I was too lite in my explanation. Sorry about that!

From this database application the easiest and most straight-forward thing is to do is "Send a URL" which simply launches the browser of choice and passes it a URL. As stated this works like a champ with GET but pages using the POST method are another matter altogether.

I suppose I could also essentially build a local webpage dynamically whithin the database application that would utilize hidden fields and submit on load but I anticipate some problems with this method.

I was just hoping that somehow the parameters could be passed via the URL like the GET method.

-Striker
 
Well the ability to send data using the POST method kind of depends on the limitations of the database application. Since that is where the URL is being generated.

The webpage is simply reading the POST data. This is a simple exercise using a server side language such as PHP or ASP.

Passing Parameters in the URL IS the GET method. If you don't want to use GET then you can't pass parameters in the URL... if you see what I mean.

POSTed data doesn't show up in the URL.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
You can, however, use XMLHttpRequest to send post data to a URL.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
So we're not dead yet.

This isn't a perfect example because Fedex uses the GET method but essentially what I would like to do is from my database--Filemaker Pro--is have the user be able to press a single button and have their browser open, go to the Fedex website, fill-in the tracking number (housed in my database), and then display the results in the browser window. Pretty simple concept and works great for sites using the GET method but as you all know, not all websites use GET. Filemaker Pro can easily open a browser window and populate the URL so this is my first choice in ways to slay-this-dragon.

As stated above Fedex is only an example but all I'm trying to do is feed parameters to dynamic websites that use the POST method that I have no control over.

-Striker
 
Can you think of a different expression than "slay this dragon"?

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top