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

Populating a remote web form

Status
Not open for further replies.

dpdoug

Programmer
Nov 27, 2002
455
US
I have Site A with a source of data -- the origin, the site I am building.

Site B has a web form for entering data -- the destination, it is not built by me.

Site A has a DataGrid with rows of data with fields that correspond to text boxes in the web form in site B.

With the web form of site B open, I want to be able to double-click a given row in my DataGrid in site A and populate the text boxes that correspond to the fields of the DataGrid in the web form on site A.

Any suggestions?
 
I don't know if you could do it like that. You could easily post data to the form in Site B but I don't think you could open that page and populate it's contents.

What you could do is develop you own page that looks identical to the page in Site B (but is just a page in Site A) and set it's form action tag to post to Site B. That way it looks as though you have gone to Site B when you double-click your DataGrid row but in reality you will only go when you submit the form.

Is that a possibility?

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I don't believe what you are asking is possible. Maybe the approach could be different. What is the business problem?

Is it possible to use the same datasource(SQL 2000 or other DB or XML file) for Site B as Site A? If so, just populate the data from the same DB. The user doesn't never have to know how you do anything, as long as it works.

Let us know so we can help.
 
The destination database is Oracle, I believe, the web app is SAP. The problem is that it doesn't Insert a new row on submit, it updates an existing one.

There must be a prior submit to create a new row before the web form is called up -- in a popup.

I can't insert a record into the database without a valid invoice number and without doing a submit first -- then the "popup" web form comes up. But the data input into the fields in the web form are used to update (not insert) a row that was previously created. It obviously stores a unique row id somewhere so that it knows what row to update.

They make it as difficult as possible to post data from outside their own web app. Which makes it difficult to get paid since the only way that they will pay what they owe is if the invoice is entered first and there are hundreds to input -- that's why the need for the automatization of the process. Payments get way behind because of the slowness to in inputting manually invoices one by one into their system, via a web form.


 
I am sorry but I am still unclear on what exactly needs to happen.

Let's break down what you have said.

DPDOUG said:
The destination database is Oracle, I believe, the web app is SAP.

OK, the client you are working with has a SAP interface and their backend is Oracle. Correct?

DPDOUG said:
The problem is that it doesn't Insert a new row on submit, it updates an existing one.

Ok, what doesn't insert a new row on submit? Here I am asking what is "it"? SAP interface?

DPDOUG said:
There must be a prior submit to create a new row before the web form is called up -- in a popup.

I have no idea what you are saying here. A prior submit to what? Are you still talking about the SAP interface? And what webform, your's?

DPDOUG said:
I can't insert a record into the database without a valid invoice number and without doing a submit first -- then the "popup" web form comes up. But the data input into the fields in the web form are used to update (not insert) a row that was previously created. It obviously stores a unique row id somewhere so that it knows what row to update.

Is this from the webform above? I am having problem with the sequence of events, and what system is what. You talk about a webform popup and another webform? Please clarify.


They make it as difficult as possible to post data from outside their own web app. Which makes it difficult to get paid since the only way that they will pay what they owe is if the invoice is entered first and there are hundreds to input -- that's why the need for the automatization of the process. Payments get way behind because of the slowness to in inputting manually invoices one by one into their system, via a web form.

I still don't get what is happening. I think what you are trying to do is speed up the payment process. Can you explain what the current system does, and what they want you to enhance? Remember that it needs to be as clear as possible because we don't work with the system every day like you do.

Let us know.


 
Ok. I've looked into it deeper and I've got a much better explanation, I think.

Actually SiteB is ASP.net front end with an SAP backend which I think is Oracle.

SiteB is where invoices must be entered and submited so that they can be approved and paid.

In SiteA (also asp.net) the user will upload a spreadsheet, where it is inserted into a sql server database. The records are then displayed (however the user needs to see them), and selected for entry in SiteB.

The idea is to open the web form in SiteB, double-click a row in a datagrid in SiteA and populate form fields in the web form in SiteB with data from the datagrid.

Then the user will need to modify the data to conform to requirments of the client in SiteB.

Next user submits form in SiteB.

The whole idea is to speed up the data entry process, which is until now, only done manually which is very time consuming since there are hundreds of invoices to input weekly.

The data can not be input diretly to the database since it needs to be massaged before submitting.

==============================

SOME OPTIONS:

1) I have duplicated the web form in siteB (using "View / Source" code to get the exact field names) and opened it in a frame in siteA to be able to populate it.

The idea is to submit the data the same way the web form in siteB does, only from my server instead of theirs. My doubt is that the submission may be blocked since it isn't coming from their server. This would be the slickest option if it could possibly work.

2) Another idea is to use the msxml object to submit the data to the other server. (This could be combined with option 1 if a form submission from one server to another is not possible.) How to implement this is unclear.

3) Another idea was to use a cross site scripting technique to populate the web form in siteB with data in the datagrid in siteA. As far as I know, IE blocks cross site scripting. But since there will only be one user using this application, I have the choice of any hardware, browser and OS that I need to use at my disposal. A different browser may allow me to do that.

I have been told that there is a way to modify the http headers in siteA so as to fool the browser into thinking that it is posting from the server where siteB lives so that it won't block it. I have no idea how that is done though.

 
Is it at all possible to get your hands on that Excel Spreadsheet? I just don't get why a company would want you to automate something but not give you anything other than HTML markup from view source to work with...And they didn't give you that. To be honest, without access to that spreadsheet or to the Oracle DB, I think this is a lost cause. If you got access to the spreadsheet(which I think you do from your posts), then you can do the manipulation needed. Let me know.
 
Well, I don't have access to the Oracle DB.

The reason the spreadsheet has to be uploaded to our database is that it is for online reporting so that our client and management can see what has been submitted and what the client has unpaid, what work orders were bad, which invoices the client didn't have enough money allocated to pay... etc. Additional info gets updated to each row in addition to what was uploaded from the spreaddsheet. Plus what needs to be automated also is emailing to tell certain people in the client company that there was an attempt to submit but it returned for lack of funds or whatever and I have to record how many times emails were sent.

All the data that is uploaded -- the idea was to speed up the data entry process since the invoices must be submitted into the client's database (the oracle DB) via their web form in order to get paid. The faster and more efficient the data goes into their database, the quicker our company gets paid.

 
OK now I am getting the point. I don't have an answer though. Maybe you could talk to the company to see if they would allow you to have a page dedicated to your company where you can autopopulate fields. Let me know if you ever get an answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top