Click here to Skip to main content
15,569,696 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionJTable Add New Record button Pin
Member 1231770910-Feb-16 1:25
Member 1231770910-Feb-16 1:25 
Questionhow to open the JTable Add new Record form in button click in another form Pin
Member 1231770910-Feb-16 0:02
Member 1231770910-Feb-16 0:02 
AnswerMy Vote of 1 Pin
Keith Barrow12-Feb-16 5:57
professionalKeith Barrow12-Feb-16 5:57 
Questionworking with showCreateForm() in jtable Pin
Member 123177099-Feb-16 20:23
Member 123177099-Feb-16 20:23 
AnswerRe: working with showCreateForm() in jtable Pin
F-ES Sitecore9-Feb-16 23:42
professionalF-ES Sitecore9-Feb-16 23:42 
GeneralRe: working with showCreateForm() in jtable Pin
Member 123177099-Feb-16 23:55
Member 123177099-Feb-16 23:55 
GeneralRe: working with showCreateForm() in jtable Pin
F-ES Sitecore9-Feb-16 23:58
professionalF-ES Sitecore9-Feb-16 23:58 
QuestionWhen IFrame load event is called ? Pin
Tridip Bhattacharjee4-Feb-16 2:45
professionalTridip Bhattacharjee4-Feb-16 2:45 
in the below code iframe is using to upload file to server. see the code and tell me when iframe load event is fired ?
JavaScript
<script type="text/javascript">

    $(document).ready(function () {

        $("#formsubmit").click(function () {

            var iframe = $('<iframe name="postiframe" id="postiframe" style="display: none"></iframe>');

            $("body").append(iframe);

            var form = $('#theuploadform');
            form.attr("action", "/upload.aspx");
            form.attr("method", "post");

            form.attr("encoding", "multipart/form-data");
            form.attr("enctype", "multipart/form-data");

            form.attr("target", "postiframe");
            form.attr("file", $('#userfile').val());
            form.submit();

            $("#postiframe").load(function () {
                iframeContents = this.contentWindow.document.body.innerHTML;
                $("#textarea").html(iframeContents);
            });

            return false;

        });

    });

</script>


code taken from here http://stackoverflow.com/questions/7909161/jquery-iframe-file-upload

the above code dynamically creating iframe and append to body and submitting the form. how the above code file is uploading to server by iframe not clear?

what is relation between file upload and iframe in above code ?

when iframe load will call ?
JavaScript
$("#postiframe").load(function () {
                iframeContents = this.contentWindow.document.body.innerHTML;
                $("#textarea").html(iframeContents);
            });

help me in details.

thanks
tbhattacharjee

AnswerRe: When IFrame load event is called ? Pin
F-ES Sitecore9-Feb-16 23:26
professionalF-ES Sitecore9-Feb-16 23:26 
GeneralRe: When IFrame load event is called ? Pin
Tridip Bhattacharjee10-Feb-16 3:09
professionalTridip Bhattacharjee10-Feb-16 3:09 
GeneralRe: When IFrame load event is called ? Pin
F-ES Sitecore10-Feb-16 3:16
professionalF-ES Sitecore10-Feb-16 3:16 
GeneralRe: When IFrame load event is called ? Pin
Tridip Bhattacharjee10-Feb-16 21:44
professionalTridip Bhattacharjee10-Feb-16 21:44 
QuestionJavascript on dynamic gridview textboxs Pin
HGCoolPal2-Feb-16 3:48
HGCoolPal2-Feb-16 3:48 
AnswerRe: Javascript on dynamic gridview textboxs Pin
Keith Barrow8-Feb-16 3:16
professionalKeith Barrow8-Feb-16 3:16 
QuestionNumber of day week in javascript Pin
Mazdak1-Feb-16 5:34
Mazdak1-Feb-16 5:34 
AnswerRe: Number of day week in javascript Pin
Keith Barrow1-Feb-16 5:56
professionalKeith Barrow1-Feb-16 5:56 
GeneralRe: Number of day week in javascript Pin
Mazdak1-Feb-16 6:03
Mazdak1-Feb-16 6:03 
GeneralRe: Number of day week in javascript Pin
Keith Barrow1-Feb-16 6:10
professionalKeith Barrow1-Feb-16 6:10 
GeneralRe: Number of day week in javascript Pin
Mazdak1-Feb-16 6:12
Mazdak1-Feb-16 6:12 
GeneralRe: Number of day week in javascript Pin
Mazdak1-Feb-16 6:11
Mazdak1-Feb-16 6:11 
Questioncomparing two dates in javascript Pin
Member 1026351927-Jan-16 23:40
Member 1026351927-Jan-16 23:40 
QuestionRe: comparing two dates in javascript Pin
Richard MacCutchan28-Jan-16 0:17
mveRichard MacCutchan28-Jan-16 0:17 
AnswerRe: comparing two dates in javascript Pin
Richard Deeming28-Jan-16 2:46
mveRichard Deeming28-Jan-16 2:46 
AnswerRe: comparing two dates in javascript Pin
Beginner Luck31-Jan-16 20:24
professionalBeginner Luck31-Jan-16 20:24 
QuestionConvert div into image in Java Script. Pin
varunPes23-Jan-16 3:11
professionalvarunPes23-Jan-16 3:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.