Hidden IFrame Values Not Making It To Server: How Do I Debug This?

  • Thread starter Thread starter pbd22
  • Start date Start date
P

pbd22

hi. i have a hidden iframe for uploading files. when
i check the httpfilecollection on the server, it is
always zero - the files never make it to the server.

i know all the javascript is working correctly on
the client b/c i have followed the local variables
using venkman.

so, something is happening on the server.

can somebody kindly guide me as to how to debug
this problem? how do i test for the successful posting
of variables from client to server via hidden iframe?

i appreciate your attention. thank you.
 
Try downloading the HttpWatch utility. It basically lets you monitor
everything the browser is sending over to the server.
 
Thanks Marina,

HttpWatch seems to be an expensive commercial product. I did hunt down
fiddler though. I think it works for firefox also. Will check this
out... thanks.
 
Ok. I have made some progress with fiddler (thanks again marina).
i am noticing that the "Body" column of the query string being passed
via hidden iframe from client to server is "-1" and all the other
columns
(caching, content-type, user-defined) are blank:

# Result Protocol Host URL Body Caching Content-Type User-defined
54 - HTTP localhost:4362
/progress.aspx?video_1=&video_0=C%3A%5CDocuments%20and%20Settings%5CAdministrator.GATEWAY-SERVER%5CMy%20Documents%5CMy%20Videos%5CGoogle%20Videos%5CShark%20vs%20Seal.gvi -1

and, here are the performance stats:

Request Count: 1
Bytes Sent: 881
Bytes Received: 0

RESPONSE CODES
--------------
HTTP/ 0: 1

RESPONSE BYTES (by Content-Type)
--------------
~headers: 0

what does all this mean? i am guessing it means that the iframe files
never
made it to the server? does anybody more experienced than myself with
fiddler see a solution in/from the above information?

again, i thank you.
 
HttpWatch should have a free trial version, or a limited functionality
version. I know I have downloaded and used the free version before.

As for your problem, I am not sure what the 'body' column is you are
referring to.

By the way, are you trying to have your hidden ifame upload files from the
client machine to the server without user intervention? If so, that is not
possible (for security reasons). You would have to either use an file input
control and have the user browse to the file to upload and then submit the
form, or have some sort of ActiveX that the user installs that would then be
able to do this automatically.
 
thanks marina,

ok, i see what you are talking about on the httpwatch site. still, i
have
installed fiddler and it seems to be doing what you are talking about.

the upload i have requires users to search for the file on their hard
drive and upload via input (type=file) through hidden iframe to the
server.

i think i might have a lead - thanks to fiddler. the header response i
am getting
looks like this:

Accept:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

but, i thought i should be seeing multipart/form-data??

my form tag looks like this on the upload form:

<form id="uploadForm" name="uploadForm" method="post"
enctype="multipart/form-data" action="progress.aspx.vb"
onsubmit="return callToServer(this.name)">
<input id="my_file_element" type="file" name="file_1" /><input
type='submit' value='Submit Query' />
</form>

but, i wonder if the fact that the "action=" attribute is pointing to
an aspx (client) page is mucking things up? the client looks like this:

<%@ Page Language="VB" Title="Untitled Page"
CodeFile="progress.aspx.vb" Inherits="progress" %>

<script type="text/javascript">
window.parent.handle();
</script>

does the this page also need an enctype=multipart/form-data?

i'll mess around with this to see if i can get anywhere... let me know
if anything
jumps out at you. thanks again for the suggestions.

peter
 
Back
Top