0

Ok my code is as follow:

<body>
<iframe>
<script>
$(function( {
 $('form).submit();
});
</script>
<form>
<input type="file" name="myfile"/>
</form>
</iframe>
</body>

this is an iframe inside another page which has a form with upload files inside submitted via jQuery.

Now i'm wondering if it's possible to hide the page loading when the form is submitted, since i'm into another page and not into the iframe page directly.

enter image description here

^ remove this animation from browser when iframe form is submitted

bombastic
  • 2,961
  • 8
  • 20
  • 18

2 Answers2

0

Yes it can be done but instead you submit the form you should call post service from jquery to hide loding on page

0

Your script inside the iframe, should be:

$(function() {
  $('form').submit();
});

That wouldn't have executed otherwise.

The way you are using text inside the frame, is for when Javascript is disabled on the client.

You can come across some problems also with frames. Can you not load the page contents into a DIV?

  • i wrote the iframe content in the example, in reality i add an src="" attribute to the iframe to load the source content, and my code alrady looks like you showed above ;) – bombastic Jul 21 '13 at 10:03