jquery is not working with blueimp upload |
[eluser]bill19[/eluser]
Hi everyone, I am trying to build an upload page using the blueimp jquery upload plugin https://github.com/blueimp/jQuery-File-U...odeIgniter The file upload is working, but the jquery/ajax component is not. I am not experienced with javascript/Jquery, Is there any obvious problems in this code preventing jquery from working? Thank you, Bill Here is the controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Here is the view; Code: <html>
[eluser]InsiteFX[/eluser]
I do not see you loading jQuery before the UI! Code: // load jQuery here!
[eluser]bill19[/eluser]
Thanks InsiteFX, 1 slight problem. I'm not sure how to load jquery. From reading on the forums the closest I've got is http://ellislab.com/forums/viewthread/217327/#1003674 , where they suggest: Code: <skript src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></skript> I put this where you suggested but its still not working. What should I do now? Thanks, Bill
[eluser]InsiteFX[/eluser]
Code: // replace the $ with s in the script tags Also you need to load the jqueryui/1.8.9 Download - jQuery 1.7.2 Download - jQuery UI 1.8.20
[eluser]weboap[/eluser]
add to @InsiteFX use Firefox firebug or chrome web developer console to find where your code is going down and post the error with the relevant code. that will help pinpoint the issue quicker. Note: @InsiteFX posted the line to insert but changed the script tag due to the forum sanitation, check that you changed the tag in your code to script.
[eluser]bill19[/eluser]
Sorry for the delay in getting back to you, My view now looks like: Code: <html> Using firebug, I'm getting the following errors when the form loads: Quote:"NetworkError: 404 Not Found - http://localhost/ionauth1/index.php/jque...eupload.js" It seems that the view is searching locally for the CDNs for some reason. How can I fix this? Bill
[eluser]bill19[/eluser]
As I look at this further, I'm realizing that the jquery files that caused an error, ARE in fact local. I've come across an additional github page: https://github.com/blueimp/jQuery-File-U...gniter-2.1. In it within the view's head there is the following: Code: <link rel="stylesheet" type="text/css" media="screen" href="http://url/assets/css/bootstrap.css"/> I just realized that I have these files located at C:\wamp\www\ionauth1\assets\js\fileupload\... It does not appear that this is being found by the script however
[eluser]InsiteFX[/eluser]
All your scripts src= and href= needs to be re-writen! Code: src="<?php echo base_url('assets/js/fileupload/tmpl.js'); ?>" > This will depend on where you placed your assets folder. Show your directory structure Should be like this Code: application
[eluser]bill19[/eluser]
Thanks for looking at it InsiteFX, The directory structure is as you laid out. using http://philsturgeon.co.uk/blog/2009/09/A...e-BASE-tag I rewrote the form head as follows: Code: <head> The program appears to be recognizing the jquery skripts, although I'm not sure about the css. Also I am getting the following error in firebug: Quote:document.getElementById(a) is nullat Quote:http://localhost/upload1/assets/js/fileupload/tmpl.js |
Welcome Guest, Not a member yet? Register Sign In |