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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit an external form

Status
Not open for further replies.

g2000

Programmer
Aug 31, 2005
39
US
I have a form that links to an external site such as ups(but it's not really ups).

My form has a textbox and a button. If the user clicks a button, it opens a window and display the tracking result.

I know how the site names the fields. And I add a new field with the identical name.

For some reasons(I guess the site blocks user from doing this), I can't do it no more.

The site recently introduced a hidden variable. I get the variable by using the method mentioned by DNG. But it doesn't work even with that hidden value. Any clue?
 
please show some code...and tell us clearly what is not working...
-DNG
 
myfile.asp

<form name="myForm" id="myForm" >

<input type="hidden" name="secretCode" value=<%=getSecret%> />
<input type="text" name="trackNo" value="" />
<input type="button" name="btn1"
onclick="javascript:go2Track();"/ >
</form>

go2Track is a javascript function that changes method, target and action. The action is changed to the external site.

Their site for tracking

<input type="text" name="trackNo" value="" />
<input type="hidden" name="secretCode" value=someChars />
<input type="submit" value="submit" />

I match them up with the secretCode and trackNo. But when I click the button, it only gets me to the site without any results.
 
but the external site doesn't have quote either and it works.
They are probably using perl or php. they have cgi-bin.
 
Can I trigger the submit function of external page using asp?
The external page is probably written by perl or php.

 
i would suggest something like this...

i am assuming that the external site has the similar search form where the users of that site can track their numbers...

so try to track some number on that site and see how the query string is build...

and using your form collect the form values and build the url with the querystring that looks like the one from that external site...

does that make any sense...or is that i am missing something here

-DNG
 
Unfortunately, they are using POST.

And I copy all fields. I meant I copy with the identical name in the form. They have 10 textboxes, 1 radio button and 1 hidden field.

The hidden field is the secret one i was talking about. This fields keep updating everything the page reloads. I guess it's the randon alphanumeric string. I grab this one with the method you showed me before.

anything else I can do about it? thanks DNG
 
hmm...ok...i observed the similar random number thing for the DHL site when i was helping one of my friends...i will look for the code in my repository and will post as soon as i found it...

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top