Vamsi Krishna B
Vamsi Krishna B

Reputation: 11490

Upload file to remote server using ajax

I don't have any control on the server side.. is it possible to upload and load the results given by the remote server in an Iframe ? please share some code.. Thanks

Upvotes: 4

Views: 2078

Answers (1)

Kirk Woll
Kirk Woll

Reputation: 77546

Declare the iframe with a name and target that name in your form element:

<form action="http://url.to.server" enctype="multipart/form-data" target="resultsFrame">
    <input type="file" />
    ...
</form>

<iframe src="blank.html" name="resultsFrame"></iframe>

Upvotes: 8

Related Questions