PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
jQuery + jQuery-File-Upload Plugin
Beitrag
<blockquote data-quote="exo" data-source="post: 1985753" data-attributes="member: 25134"><p><strong>AW: jQuery + jQuery-File-Upload Plugin</strong></p><p></p><p>Hi,</p><p></p><p>vielen Dank erst einmal für deine Ausführliche Hilfe... Leider will es immer noch nicht funktionieren. Im FF wird jetzt zwar die Standardfunktion des Browsers unterdrückt wie im Chrome so wie es sein soll, aber es geschieht einfach nichts. Auch die Buttons lassen sich nicht benutzen.</p><p></p><p>Hier nochmal mein Code so wie es jetzt ausschaut:</p><p></p><p>index.php </p><p>[html]</p><p><html></p><p>....</p><p><body></p><p>....</p><p><script id="template-upload" type="text/x-jquery-tmpl"></p><p> <tr class="template-upload{{if error}} ui-state-error{{/if}}"></p><p> <td class="preview"></td></p><p> <td class="name">${name}</td></p><p> <td class="size">${sizef}</td></p><p> {{if error}}</p><p> <td class="error" colspan="2">Error:</p><p> {{if error === 'maxFileSize'}}File is too big</p><p> {{else error === 'minFileSize'}}File is too small</p><p> {{else error === 'acceptFileTypes'}}Filetype not allowed</p><p> {{else error === 'maxNumberOfFiles'}}Max number of files exceeded</p><p> {{else}}${error}</p><p> {{/if}}</p><p> </td></p><p> {{else}}</p><p> <td class="progress"><div></div></td></p><p> <td class="start"><button>Start</button></td></p><p> {{/if}}</p><p> <td class="cancel"><button>Cancel</button></td></p><p> </tr></p><p></script></p><p><script id="template-download" type="text/x-jquery-tmpl"></p><p> <tr class="template-download{{if error}} ui-state-error{{/if}}"></p><p> {{if error}}</p><p> <td></td></p><p> <td class="name">${namefdsa}</td></p><p> <td class="size">${sizef}</td></p><p> <td class="error" colspan="2">Error:</p><p> {{if error === 1}}File exceeds upload_max_filesize (php.ini directive)</p><p> {{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive)</p><p> {{else error === 3}}File was only partially uploaded</p><p> {{else error === 4}}No File was uploaded</p><p> {{else error === 5}}Missing a temporary folder</p><p> {{else error === 6}}Failed to write file to disk</p><p> {{else error === 7}}File upload stopped by extension</p><p> {{else error === 'maxFileSize'}}File is too big</p><p> {{else error === 'minFileSize'}}File is too small</p><p> {{else error === 'acceptFileTypes'}}Filetype not allowed</p><p> {{else error === 'maxNumberOfFiles'}}Max number of files exceeded</p><p> {{else error === 'uploadedBytes'}}Uploaded bytes exceed file size</p><p> {{else error === 'emptyResult'}}Empty file upload result</p><p> {{else}}${error}</p><p> {{/if}}</p><p> </td></p><p> {{else}}</p><p> <td class="preview"></p><p> {{if Thumbnail_url}}</p><p> <a href="${url}" target="_blank"><img src="${Thumbnail_url}"></a></p><p> {{/if}}</p><p> </td></p><p> <td class="name"></p><p> <a href="${url}"{{if thumbnail_url}} target="_blank"{{/if}}>${Name}</a></p><p> </td></p><p> <td class="size">${Length}</td></p><p> <td colspan="2"></td></p><p> {{/if}}</p><p> <td class="delete"></p><p> <button data-type="${delete_type}" data-url="${delete_url}">Delete</button></p><p> </td></p><p> </tr></p><p></script></p><p></p><p><script src="js/jquery-1.7.2.js"></script></p><p><script src="js/jquery-ui-1.8.18.custom.min.js"></script></p><p><script src="js/jquery-ui-timepicker-addon.js"></script></p><p> </p><p><script src="http://blueimp.github.com/cdn/js/bootstrap.min.js"></script></p><p><script src="http://blueimp.github.com/Bootstrap-Image-Gallery/js/bootstrap-image-gallery.min.js"></script></p><p></p><p> <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included --></p><p><script src="js/vendor/jquery.ui.widget.js"></script></p><p><!-- The Templates plugin is included to render the upload/download listings --></p><p><script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script></p><p><script src="//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script></p><p><!-- The Load Image plugin is included for the preview images and image resizing functionality --></p><p><script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script></p><p><!-- The Canvas to Blob plugin is included for image resizing functionality --></p><p><script src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script></p><p><script src="js/jquery.livequery.js"></script></p><p><!-- The Iframe Transport is required for browsers without support for XHR file uploads --></p><p><script src="js/jquery.iframe-transport.js"></script></p><p><!-- The basic File Upload plugin --></p><p><script src="js/jquery.fileupload.js"></script></p><p><!-- The File Upload file processing plugin --></p><p><script src="js/jquery.fileupload-fp.js"></script></p><p><!-- The File Upload user interface plugin --></p><p><script src="js/jquery.fileupload-ui.js"></script></p><p></p><p><!-- Laden der eigenen J-Scripte / Hier werden auch die content-funktionen geladen --></p><p><script src="js/ws.js"></script> </p><p> </p><p> </body></p><p></html></p><p>[/html]</p><p></p><p></p><p>ws.js</p><p>[php]</p><p>function loadContent(id){</p><p> var Content = $("#content_"+id); </p><p> </p><p> if( Content.hasClass("loaded") == false)</p><p> {</p><p> Content.load("functions/_rpc_content.php?id="+id, function(){</p><p> loadArtikelList("artikel_content", id);</p><p> console.log('Content geladen'); </p><p> console.log($('#fileupload'));</p><p> $('#fileupload').fileupload();</p><p> </p><p> $('#fileupload').fileupload('option',{</p><p> 'fileInput': $('input:file'),</p><p> url: 'hier-sollen-die-files-hin.php'</p><p> });</p><p></p><p> }).addClass("loaded").delay(800);</p><p> } </p><p>}</p><p>[/php]</p><p></p><p>_rpc_content.php (Content der nachgeladen wird - hier nur das Formular um was es geht)</p><p>[html]</p><p><form id="fileupload" action="server/php/" method="POST" enctype="multipart/form-data"></p><p> <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --></p><p> <div class="row fileupload-buttonbar"></p><p> <div class="span7"></p><p> <!-- The fileinput-button span is used to style the file input field as button --></p><p> <span class="btn btn-success fileinput-button"></p><p> <i class="icon-plus icon-white"></i></p><p> <span>Add files...</span></p><p> <input type="file" name="files[]" multiple></p><p> </span></p><p> <button type="submit" class="btn btn-primary start"></p><p> <i class="icon-upload icon-white"></i></p><p> <span>Start upload</span></p><p> </button></p><p> <button type="reset" class="btn btn-warning cancel"></p><p> <i class="icon-ban-circle icon-white"></i></p><p> <span>Cancel upload</span></p><p> </button></p><p> <button type="button" class="btn btn-danger delete"></p><p> <i class="icon-trash icon-white"></i></p><p> <span>Delete</span></p><p> </button></p><p> <input type="checkbox" class="toggle"></p><p> </div></p><p> <!-- The global progress information --></p><p> <div class="span5 fileupload-progress fade"></p><p> <!-- The global progress bar --></p><p> <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"></p><p> <div class="bar" style="width:0%;"></div></p><p> </div></p><p> <!-- The extended global progress information --></p><p> <div class="progress-extended">&nbsp;</div></p><p> </div></p><p> </div></p><p> <!-- The loading indicator is shown during file processing --></p><p> <div class="fileupload-loading"></div></p><p>[/html]</p><p></p><p>Vielleicht siehst du ja eventuell noch einen Fehler, bin jetzt auch schon ein paar Tage an der</p><p>Sache dran, aber irgendwie komm ich gar nicht weiter... <img src="/styles/default/xenforo/smilies/uhm.gif" class="smilie" loading="lazy" alt=":(" title="Frown :(" data-shortname=":(" /></p><p></p><p></p><p>//Edit</p><p></p><p>wobei mir Chrome gerade jetzt zwei errors raushaut:</p><p>[code]</p><p>Uncaught TypeError: Cannot read property 'support' of undefined /js/jquery.fileupload.js:33</p><p>Uncaught TypeError: Cannot read property 'blueimpFP' of undefined /js/jquery.fileupload-ui.js:38[/code]</p></blockquote><p></p>
[QUOTE="exo, post: 1985753, member: 25134"] [b]AW: jQuery + jQuery-File-Upload Plugin[/b] Hi, vielen Dank erst einmal für deine Ausführliche Hilfe... Leider will es immer noch nicht funktionieren. Im FF wird jetzt zwar die Standardfunktion des Browsers unterdrückt wie im Chrome so wie es sein soll, aber es geschieht einfach nichts. Auch die Buttons lassen sich nicht benutzen. Hier nochmal mein Code so wie es jetzt ausschaut: index.php [html] <html> .... <body> .... <script id="template-upload" type="text/x-jquery-tmpl"> <tr class="template-upload{{if error}} ui-state-error{{/if}}"> <td class="preview"></td> <td class="name">${name}</td> <td class="size">${sizef}</td> {{if error}} <td class="error" colspan="2">Error: {{if error === 'maxFileSize'}}File is too big {{else error === 'minFileSize'}}File is too small {{else error === 'acceptFileTypes'}}Filetype not allowed {{else error === 'maxNumberOfFiles'}}Max number of files exceeded {{else}}${error} {{/if}} </td> {{else}} <td class="progress"><div></div></td> <td class="start"><button>Start</button></td> {{/if}} <td class="cancel"><button>Cancel</button></td> </tr> </script> <script id="template-download" type="text/x-jquery-tmpl"> <tr class="template-download{{if error}} ui-state-error{{/if}}"> {{if error}} <td></td> <td class="name">${namefdsa}</td> <td class="size">${sizef}</td> <td class="error" colspan="2">Error: {{if error === 1}}File exceeds upload_max_filesize (php.ini directive) {{else error === 2}}File exceeds MAX_FILE_SIZE (HTML form directive) {{else error === 3}}File was only partially uploaded {{else error === 4}}No File was uploaded {{else error === 5}}Missing a temporary folder {{else error === 6}}Failed to write file to disk {{else error === 7}}File upload stopped by extension {{else error === 'maxFileSize'}}File is too big {{else error === 'minFileSize'}}File is too small {{else error === 'acceptFileTypes'}}Filetype not allowed {{else error === 'maxNumberOfFiles'}}Max number of files exceeded {{else error === 'uploadedBytes'}}Uploaded bytes exceed file size {{else error === 'emptyResult'}}Empty file upload result {{else}}${error} {{/if}} </td> {{else}} <td class="preview"> {{if Thumbnail_url}} <a href="${url}" target="_blank"><img src="${Thumbnail_url}"></a> {{/if}} </td> <td class="name"> <a href="${url}"{{if thumbnail_url}} target="_blank"{{/if}}>${Name}</a> </td> <td class="size">${Length}</td> <td colspan="2"></td> {{/if}} <td class="delete"> <button data-type="${delete_type}" data-url="${delete_url}">Delete</button> </td> </tr> </script> <script src="js/jquery-1.7.2.js"></script> <script src="js/jquery-ui-1.8.18.custom.min.js"></script> <script src="js/jquery-ui-timepicker-addon.js"></script> <script src="http://blueimp.github.com/cdn/js/bootstrap.min.js"></script> <script src="http://blueimp.github.com/Bootstrap-Image-Gallery/js/bootstrap-image-gallery.min.js"></script> <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included --> <script src="js/vendor/jquery.ui.widget.js"></script> <!-- The Templates plugin is included to render the upload/download listings --> <script src="http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script> <script src="//ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> <!-- The Load Image plugin is included for the preview images and image resizing functionality --> <script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script> <!-- The Canvas to Blob plugin is included for image resizing functionality --> <script src="http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script> <script src="js/jquery.livequery.js"></script> <!-- The Iframe Transport is required for browsers without support for XHR file uploads --> <script src="js/jquery.iframe-transport.js"></script> <!-- The basic File Upload plugin --> <script src="js/jquery.fileupload.js"></script> <!-- The File Upload file processing plugin --> <script src="js/jquery.fileupload-fp.js"></script> <!-- The File Upload user interface plugin --> <script src="js/jquery.fileupload-ui.js"></script> <!-- Laden der eigenen J-Scripte / Hier werden auch die content-funktionen geladen --> <script src="js/ws.js"></script> </body> </html> [/html] ws.js [php] function loadContent(id){ var Content = $("#content_"+id); if( Content.hasClass("loaded") == false) { Content.load("functions/_rpc_content.php?id="+id, function(){ loadArtikelList("artikel_content", id); console.log('Content geladen'); console.log($('#fileupload')); $('#fileupload').fileupload(); $('#fileupload').fileupload('option',{ 'fileInput': $('input:file'), url: 'hier-sollen-die-files-hin.php' }); }).addClass("loaded").delay(800); } } [/php] _rpc_content.php (Content der nachgeladen wird - hier nur das Formular um was es geht) [html] <form id="fileupload" action="server/php/" method="POST" enctype="multipart/form-data"> <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --> <div class="row fileupload-buttonbar"> <div class="span7"> <!-- The fileinput-button span is used to style the file input field as button --> <span class="btn btn-success fileinput-button"> <i class="icon-plus icon-white"></i> <span>Add files...</span> <input type="file" name="files[]" multiple> </span> <button type="submit" class="btn btn-primary start"> <i class="icon-upload icon-white"></i> <span>Start upload</span> </button> <button type="reset" class="btn btn-warning cancel"> <i class="icon-ban-circle icon-white"></i> <span>Cancel upload</span> </button> <button type="button" class="btn btn-danger delete"> <i class="icon-trash icon-white"></i> <span>Delete</span> </button> <input type="checkbox" class="toggle"> </div> <!-- The global progress information --> <div class="span5 fileupload-progress fade"> <!-- The global progress bar --> <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"> <div class="bar" style="width:0%;"></div> </div> <!-- The extended global progress information --> <div class="progress-extended"> </div> </div> </div> <!-- The loading indicator is shown during file processing --> <div class="fileupload-loading"></div> [/html] Vielleicht siehst du ja eventuell noch einen Fehler, bin jetzt auch schon ein paar Tage an der Sache dran, aber irgendwie komm ich gar nicht weiter... :( //Edit wobei mir Chrome gerade jetzt zwei errors raushaut: [code] Uncaught TypeError: Cannot read property 'support' of undefined /js/jquery.fileupload.js:33 Uncaught TypeError: Cannot read property 'blueimpFP' of undefined /js/jquery.fileupload-ui.js:38[/code] [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ★ = 12, ◇ = 4 und die Hälfte von ★ zu ◇ addiert wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
jQuery + jQuery-File-Upload Plugin
Oben