Skip to content

Instantly share code, notes, and snippets.

@agusmakmun
Last active November 13, 2015 20:54
Show Gist options
  • Save agusmakmun/5207bfdf65ebdb5b2a87 to your computer and use it in GitHub Desktop.
Save agusmakmun/5207bfdf65ebdb5b2a87 to your computer and use it in GitHub Desktop.
Tables will be hidden when it was completed submit order.
<table id="table-show-hidden">
<tr>
<th>Produk</th>
<th>Jumlah</th>
<th>Total Harga</th>
<th>Aksi</th>
</tr>
</table>
<iframe id="myframe" src="/myframe/" frameborder="0" width="100%" height="500px"></iframe>
<script type="text/javascript">
$('#myframe').load(function(){
var iframe = $('#myframe').contents();
iframe.find("#sending").click(function(){
//alert("test");
document.getElementById("table-show-hidden").style.display = "none";
});
});
</script>
//-------------- Inside iframe --------------
<form id="my_form" method="post">
{% csrf_token %}
{{ form }}
<div class="form-actions">
<button type="submit" id="sending">Send</button>
</div>
</form>
Solved: http://stackoverflow.com/a/13782102/3445802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment