SPUG: Can this even be done? [ setting fields on 3rd party webpage ]

Chris Wilkes cwilkes-spug at ladro.com
Tue Jun 22 15:07:55 CDT 2004


On Tue, Jun 22, 2004 at 12:45:36PM -0700, Dave Coleman wrote:
>  I want to build a link ( or something you can click on, it doesn't
>  need to be a link ) on a web page that is under my control that will
>  access a 3rd party page ( one that is not under my control ) and
>  automatically fill one or more of the text boxes on that page.

I believe you're going to have to work with that 3rd party web page to
implement this as what's going to happen is:

1) user fills out info on your webpage
2) they click a submit button
3) either through javascript on the button or a meta refresh sent
   back by the server they are redirected over to the 3rd party page
4) that page doesn't know anything about the person other than they 
   just want the foobar.html page and gives it to them.

You might be able to do this without the cooperation of the 3rd party
by including their web page in a frame whose main html (that's the page
that includes the framesets) is on your site, thus allowing you to use
javascript to set those fields.

You'll have to know the names of those fields exactly, and if the 3rd
party changes them then your javascript setters will fail.

However that's really hijacking the 3rd parties's service and branding
it as your own.  Perhaps they don't care, but you should really let them
know you're doing it.

The best solution is to contact them and ask if you can send those
completed fields in a querystring and have them automatically set.  They
can slap that onto an existing site with some javascript if they do not
have the capability already (of course this depends on the user having
javascript enabled).

Chris



More information about the spug-list mailing list