Note that there are some explanatory texts on larger screens.

plurals
  1. POJavascript doesnt update
    primarykey
    data
    text
    <p>I have a function that passes a parameter which is a function call and then i use setTimeout to call this passed function call. now i tried two methods with setTimout to raise the event and i used function.call(). When this passed parameter function call was raised none of the javascript was being updated, below is the javascript which im using to raise the event and the javascript which is supposed to be updated:</p> <p>The function being passed is [context] - function() { ErrorMessageFileSelect('diverrortextchoosechannal','The file chosen is to big, you must choose a file less than 1MB'); }</p> <pre><code>function FileSizeOnLoad(contentLength,context) { if (context != null) { // context.call(); context.call(); } else { $('#inputHiddenFileSizeField').val(contentLength); DisplayChoseFileInformation(contentLength); } } </code></pre> <p>//this is where the update should happen - this function is added in an entirley different Javascript file.</p> <pre><code>function ErrorMessageFileSelect(className, errorMessage) { $('div.' + className).text(errorMessage); alert($('div.' + className).text()); } function DisplayChoseFileInformation(fileSize) { var input = $('#ajaxsinglefileupload'); inputValue = $(input).val(); var splitFilename = inputValue.split("\\"); var filename = splitFilename[splitFilename.length - 1]; $("div.divfileuploadinformation").html("File chosen: '" + filename + "'"); var div = $("&lt;div/&gt;"); $("div.divfileuploadinformation").append(div); if (parseInt(fileSize) &lt; 1024) { $(div).html("File Size: " + parseInt(fileSize) + " bytes"); } else { var kb = fileSize / 1024; if (kb &lt; 1024) { $(div).html("File Size: " + parseInt(kb).toFixed(0) + " kb"); } else { $(div).html("File Size: " + (parseInt(kb).toFixed(0) / 1024).toFixed(0) + " mb"); } } $(div).css("padding-left", "50px"); $(div).css("display", "inline-block"); $('div.divfileprogress').show() } </code></pre> <p>Is there somthing im missing, can someone help me with this issue please.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload