Note that there are some explanatory texts on larger screens.

plurals
  1. PO.uploadifySettings not working as expected
    primarykey
    data
    text
    <p>I'm using <a href="http://www.uploadify.com/documentation/" rel="nofollow noreferrer">uploadify</a> and the function to change the settings doesn't seem to be working.</p> <p>I'm basing my code from the following example:</p> <pre><code>#(‘#someID’).uploadifySettings(’scriptData’, {‘name’ : some.val()}); </code></pre> <p>So here's what I'm doing:</p> <pre><code>// INITIALIZATION $("#"+elementId).uploadify({ // other data "scriptData": { "token": token } }); </code></pre> <p>Later on I want to update the scriptData:</p> <pre><code>$("#"+elementId).uploadifySettings("scriptData",{"token": "pleasework"}); </code></pre> <p>... but this is not working, it's still using the scriptData set during the initialization.</p> <p>What am I doing wrong?</p> <hr> <p>UPDATE: I need to do this because I need to handle tokens. Here's the worflow:</p> <pre><code>1- Get a token 2- Init uploadify with this token 3- Upload a file 4- Get another token asynchronously 5- Add the token to the already initialized uploadify (bugged) 6- Go to 3 </code></pre> <p>I tried doing this on initialization:</p> <pre><code>"scriptData": { "token": $(".token").val() } </code></pre> <p>... and update .token on step 4</p> <p>This doesn't work either</p> <p>UPDATE 2: Also if I do:</p> <pre><code>"scriptData": { "token": getAToken() } </code></pre> <p>with</p> <pre><code>function getAToken(){ alert("abcd"); return "sometoken"; } </code></pre> <p>... I can see that the function getAToken only gets called once (only 1 alert)</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.
 

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