How to get reference to a served file after submitting a form?

View: New views
3 Messages — Rating Filter:   Alert me  

How to get reference to a served file after submitting a form?

by bytebybyte :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
There are pages that after you submit a form, a file of some sort is pushed from the server. Under a browser environment, you are prompted to choose how to deal with it.
As DOM is about the automation of http handling, there should be a way to imitate the interchange between the user agent and server.
I tried stand alone script with
xmlhttp.open ("PUT", action-url, false);
xmlhttp.send(form-name-value-pairs);
the responsetext is but the form page itself.
I tried using the MSHTTP and invoke a "click" event on the submit button, the page is opened in the browser.
Looking up W3 and there is event-stream, but no likely the scenario, which is new and my problem should an old one.
I have been working over one week but still at nowhere to find a way to get the file served.  Can gurus here shed me some light?
Much thanks in advance.

Re: How to get reference to a served file after submitting a form?

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 05 Oct 2009 15:24:16 +0200, bytebybyte <zgguanz@...> wrote:

> There are pages that after you submit a form, a file of some sort is  
> pushed
> from the server. Under a browser environment, you are prompted to choose  
> how
> to deal with it.
> As DOM is about the automation of http handling, there should be a way to
> imitate the interchange between the user agent and server.
> I tried stand alone script with
> xmlhttp.open ("PUT", action-url, false);
> xmlhttp.send(form-name-value-pairs);
> the responsetext is but the form page itself.
> I tried using the MSHTTP and invoke a "click" event on the submit button,
> the page is opened in the browser.
> Looking up W3 and there is event-stream, but no likely the scenario,  
> which
> is new and my problem should an old one.
> I have been working over one week but still at nowhere to find a way to  
> get
> the file served.  Can gurus here shed me some light?
> Much thanks in advance.

XMLHttpRequest should do the trick. Are you sure that when you perform a  
request you actually get the right data back? Some browsers might have  
problems with PUT still I suppose, but I don't think so.

Further questions you probably want to raise on a developer forum though.  
This is not a help a mailing list.


--
Anne van Kesteren
http://annevankesteren.nl/


Re: How to get reference to a served file after submitting a form?

by bytebybyte :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Anne van Kesteren-2 wrote:
On Mon, 05 Oct 2009 15:24:16 +0200, bytebybyte <zgguanz@hotmail.com> wrote:
> There are pages that after you submit a form, a file of some sort is  
> pushed
> from the server. Under a browser environment, you are prompted to choose  
> how
> to deal with it.
> As DOM is about the automation of http handling, there should be a way to
> imitate the interchange between the user agent and server.
> I tried stand alone script with
> xmlhttp.open ("PUT", action-url, false);
> xmlhttp.send(form-name-value-pairs);
> the responsetext is but the form page itself.
> I tried using the MSHTTP and invoke a "click" event on the submit button,
> the page is opened in the browser.
> Looking up W3 and there is event-stream, but no likely the scenario,  
> which
> is new and my problem should an old one.
> I have been working over one week but still at nowhere to find a way to  
> get
> the file served.  Can gurus here shed me some light?
> Much thanks in advance.

XMLHttpRequest should do the trick. Are you sure that when you perform a  
request you actually get the right data back? Some browsers might have  
problems with PUT still I suppose, but I don't think so.

Further questions you probably want to raise on a developer forum though.  
This is not a help a mailing list.


--
Anne van Kesteren
http://annevankesteren.nl/
Thanks, I figured out there was not server action but the response of browser is modified somehow by script which is yet to be duplicated. Anyway, thanks for the reply.