php - Inserting upload script into existing form page does not process upload? -


I have a file upload script which works great when opening from the calling page through the window. Open () However, I am trying to avoid the popup window and to load the script in the calling page (by jQuery.load ()).

However, although everything works fine, the file is not actually moving. The calling page itself is a form. Can this cause problems?

  & lt; Form id = "myParentPage" & gt; & Lt; Div id = "myUploadPlaceholder" & gt; & Lt; / Div & gt; & Lt; Input type = "button" id = "load script" value = "test" /> & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# loadScript'). Click (function () {$ ('# myUploadPlaceholder'). Load ('myUploadScript.php? Action = test');}); }); & Lt; / Script & gt; & Lt; / Form & gt;    

Try using the hidden iframe instead: < Pre> & lt; Iframe id = "myUploadPlaceholder" src = "_ blank" & gt; & Lt; / Iframe & gt; & Lt; Input type = "button" id = "load script" value = "test" /> & Lt; Script type = "text / javascript" & gt; $ (Document) .ready (function () {$ ('# loadScript'). Click (function () {$ ('# myUploadPlaceholder'). Attr ('src', 'myUploadScript.php? Action = test') ;});}); & Lt; / Script & gt;

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -