error77
asked on
Javascript code not working assistance needed
Hi all,
I am trying to get Uploadify to work but when I click the button to open the window that selects the files, nothing happens.
I was wondering if anyone can spot any potential problems in the code attached below.
Thanks
I am trying to get Uploadify to work but when I click the button to open the window that selects the files, nothing happens.
I was wondering if anyone can spot any potential problems in the code attached below.
Thanks
<html>
<head>
<link href="/uploadfilesfolder/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/uploadfilesfolder/swfobject.js"></script>
<script type="text/javascript" src="/uploadfilesfolder/jquery.uploadify.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : '/uploadfilesfolder/uploadify.swf',
'script' : '/uploadfilesfolder/uploadify.php',
'cancelImg' : '/uploadfilesfolder/cancel.png',
'folder' : '<?php echo($_SERVER['DOCUMENT_ROOT']."/uploads/images") ?>',
'auto' : true
});
});
</script>
</head>
<body>
<div>
<input id="file_upload" type="file" name="Filedata" />
<p><a href="javascript:$('#file_upload').uploadifyUpload();">Upload Files</a></p>
</div>
</body>
</html>
jquery js include is missing, you are including only jquery.uploadify.min.js
ASKER
Sorry, I forgot to mention...I've got it included, just not in attached code as I wanted to just have the uploadify stuff.
All scripts are successfully included in the page too ... I've checked that.
Thanks
All scripts are successfully included in the page too ... I've checked that.
Thanks
ASKER
I'm using this BTW:
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></s cript>
<script src="http://code.jquery.com/jquery-1.6.4.min.js" type="text/javascript"></s
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
OK, got it to open but not uploading the file.
On uploadify.php I've set the rootfolder to '/'
and on the javascript I've set an absolute path to the image folder but nothing's happening...
No errors but no file uploaded.
On uploadify.php I've set the rootfolder to '/'
and on the javascript I've set an absolute path to the image folder but nothing's happening...
No errors but no file uploaded.
check your post whether file content is sent to the server and check access rights and do some debug output in the upload process