Closed Thread Icon

Topic awaiting preservation: Two different forms...same fields... Pages that link to <a href="https://ozoneasylum.com/backlink?for=12507" title="Pages that link to Topic awaiting preservation: Two different forms...same fields..." rel="nofollow" >Topic awaiting preservation: Two different forms...same fields...\

 
Author Thread
Thumper
Paranoid (IV) Inmate

From: Deeetroit, MI. USA
Insane since: Mar 2002

posted posted 11-16-2002 20:36

I have a scenario where I'd like to be able to have one window (or frame) with a form...and another (not ours, so there is really no editing this one) that I could possibly have the information being inputted into the fields on [ours] go into the fields on [there's] as well at the same time. Thus both forms will have the same information inputted, it will be inputted [once], and the information will go to each respective database. Is there some kind of a target script that can be used here. I know this is not a good user experience, but it is going to help.

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 11-17-2002 02:31

I would think (but I'm not positive) that if the windows are named, you could use Javascript to make a form box on one page equal to the text in a form box on the other.

-Butcher-

stinx
Bipolar (III) Inmate

From: London, UK
Insane since: Apr 2002

posted posted 11-18-2002 16:53

You could bounce the result of your action script to the other page's action script once you're done, forwarding all the variables on as you go. Unfortunately this means that you lose control of the script, as the user ends up at the other site.

Or you could maybe use a hidden frame if you didn't want the end user to see what's happening, e.g. have the form submit to an action page which updates the db and then kicks this out:

code:
<html>
<head></head>
<frameset rows="0,*">
<frame src="http://that.other.site/that-other.php?var1=<?php echo $one;?>&var2=<?php echo $two;?>" />
<frame src="your-output.php" />
</framset>
</html>



If you want anything to show in the output that relates to the form values, you would either have to pass them on to the output page aswell, or create the output page on the fly while you're updating the db, and save that to disk.


Thumper
Paranoid (IV) Inmate

From: Deeetroit, MI. USA
Insane since: Mar 2002

posted posted 11-19-2002 04:19

Thanks for the ideas! I will play around with this...I know this is not a good idea, but the org that I am doing this for MUST submit the info into [their] form, but they want to be able to record the info they input. Basically, we want a carbon copy for [our] records.

stinx
Bipolar (III) Inmate

From: London, UK
Insane since: Apr 2002

posted posted 11-20-2002 17:02

Oh, and you could use perl, build up a post request within the script, fire it off from your server to theirs, and then update your own db. No frames, no javascript, the user won't see it, and it only requires one script to do both actions.

It might be possible to do this in php, but afaik it's better documented and probably easier in perl if you have the LWP / UserAgent modules installed.


« BackwardsOnwards »

Show Forum Drop Down Menu