Ajax :: JQuery Call - Shows A List Of Files
Jun 10, 2011
I have a database driven website, which shows a list of files that have been uploaded by users. I have a script called controller.php, which generates the HTML:
Code:
//excerpt
<?php foreach($uploads as $upload): ?>
<div class="upload">
<p><?php echo $upload['filename'] ?> |
<?php echo $upload['size'] ?> |
<?php echo $upload['type'] ?>
</p>
[Code]...
View 3 Replies
ADVERTISEMENT
Mar 14, 2011
This is my first message and I am extremely new to jQuery. I am using Ajax to call external html pages into a div in my site. I have three external html forms which uses JavaScript and one .file. When I call these pages, the html pages are being rendered correctly but the JavaScript and .pl file (form post) is not being executed. Any ideas on how to resolve?
View 1 Replies
View Related
Apr 9, 2011
I have a page that creates one unordered list from the contents of another list. The second list is created from a database query and is hidden on the page. I have written a JQuery function shown below that does an AJAX call which causes the hidden list to be created and that is working perfectly. The problem is that when the code following the AJAX call is executed it doesn't see the hidden list. The alert message displays 0 the first time. clicking on the Load button a second time results in the first list being displayed. If I click on the Load button a third time, the previously loaded list is displayed; click on a fourth time and the new list is displayed.
In other words, it takes two cycles to display the correct list. I am at a loss as to what might be the problem. Other than this issue the code does what I need it to do.
$(function() {
View 2 Replies
View Related
Mar 27, 2009
I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.
View 1 Replies
View Related
Aug 27, 2010
In my quest to implement ajax for the first time i've hit a brick wall. i've been searching for hours for a solution but with no success. Here is the problem.
[Code]...
why is it not working? my PHP code is outputting the contents of the xml document.
View 1 Replies
View Related
Sep 5, 2008
I want to write a javascript to list of all files in a folder including files in the subfolders. This is for the scorm purpose to list all the files. some examples are listing files but not listing the files inside the subdirectories. I want the file's full path like C:Documentsjavascriptwilson.js like this.
View 5 Replies
View Related
Oct 8, 2011
I am using jquery ui to have two connected sortable lists. The first list is available numbers, and the second is selected numbers. Everything with the jquery is working fine. The problem i am having is when i try to get the contents of the selected numbers box, it is empty, even though the sortables are or were dragged to that list. I tried using this.
var response = $("#selected_numbers_box").val();
alert( response );
and I also tried this..
var response = $("#selected_numbers_box").html();
alert( response );
both are empty. What i am trying to do is retrieve the values of the new list "Selected numbers Box".
View 3 Replies
View Related
Oct 20, 2011
I wanna get the list of *.jpg files in a folder beside of my html with JQuey.
View 1 Replies
View Related
Sep 21, 2010
I need a list the files in a folder that is in my website. Can I do this using jQuery? also, the user will able to click in the link to open the file.
View 2 Replies
View Related
May 26, 2010
1 - Accordion style vertical list that expands element (Film # and description) when "+more" link is clicked, and closes the previous open film and description.
2 - Activation of "+ more" shows a photo in separate div, and hides the previous photo that was visible in this separate div.
View 4 Replies
View Related
Nov 11, 2010
I am working with MODx CMS. Following website: Carlindesign I integrated the cycle plugin on the home. It works but after the cycle is done the cycle call shows up instead of the next cycle.
View 2 Replies
View Related
Sep 14, 2010
I've been using JavaScript for a few years now I'm not a huge expert I rely more of JQuery. I am just wondering what best solutions are there to call Javascript files (and to make pages load faster):
Normally I request all these in the Header like you normally would but I have seen and heard people to call their Javascript files in the footer to make page load faster and have all their Javascript functions all in the footer as well.
Is this a good idea? What are the downside? Should I just keep all my JS in the Header as usual?
View 1 Replies
View Related
Apr 1, 2011
We are looking to implement something similar to the navigation found at this site: [URL] When you click on ABOUT, CONTACT, or LAB, the appropriate div within the content-main div shows/hides as appropriate. Fancy. I'm happy to read up on this on my own, but I don't really know how they accomplished this, so I'm not sure what to research. Since the page doesn't refresh, I'm assuming AJAX may be involved? Most importantly, I'm very interested in how their URL structure works. It looks like #about is an anchor that they are linking to. I thought about doing it in PHP, which I'm more familiar with, but I'd rather not refresh the page if I don't have to.
View 9 Replies
View Related
Jun 10, 2009
Here is what I am trying to do. I created a .js to talk to 3-4 Drop down boxes with info I put in them. On the last drop box i currently just having it read "download" The is the drop down box I would like to populate files in a certain folder. Can anyone give me any insite on how to go about doing so? This is what is on my HTML.
[Code]....
View 1 Replies
View Related
Dec 5, 2002
I want to make an extensive browser/fileupload script inspired on windows Explorer... A server side listing of the files and directories with the home directory specified in the script and a listing of the clients files. The server side part can be found on http://vegeta.evilkalah.be ... The idea now is to make it possible to upload or download (maybe drag and drop) files from on side to the other. I don't know how I best make the client side. So on this part any help is welcome...
View 6 Replies
View Related
Sep 9, 2010
Anyone have a link or search term for a way to allow the user to upload a list of file names to a web form? I do not need the actual files, just the file names -- name only or full path, doesn't matter. I can live with either just pointing to a directory and grabbing every file name in it, or requiring the user to select all the desired files from within a directory list. (My guess is that the JavaScript sandbox for a web form won't allow this, but I figured I'd check with you experts before looking into other possibilities, e.g. Java applet, etc.) I'm already using the JQuery library for some other stuff, in case there's something I should be looking for there or one of its plug-ins.
View 8 Replies
View Related
Apr 20, 2009
I'm trying to load some javascript files via ajax, I can't get it to catch 404 errors. I've tried searching, but everything I've found says that I should check the status on the request object to catch it but it's not even getting that far.
I've tried:
I would try $.getScript, but that appears to have no way of handling errors. I've even tried just doing a console.info("test") -- it doesn't even do that. Firebug shows a 404 error (obviously) but the error doesn't seem to be being caught? I'm loading jquery through the google api, version 1.3.2.
View 3 Replies
View Related
Aug 17, 2009
I'm having a weird problem using ajax. I use ajax to create a input field inside a form.
like this:
Before Ajax script
Code:
After Ajax script
Code:
The Ajax script works perfectly. the problem occurs when I try to send the form with the new field. The form doesn't send the field data to test.php. And more weird is that it works on IE, only on FF the problem occurs. Nothing shows in the Errors Console, and I have the last Firefox version.
View 11 Replies
View Related
Dec 14, 2010
The general framework is a simple user login function. The user name is selected and a password entered as usual. The function grabs the element values and passes them to a php page that queries the database. An AJAX call returns the password to the function and then I want the innerHTML to be a choice of two web pages, depending on success or failure of validation. There are existing AJAX functions available on the internet but they are overly complicated for what I think should be a simple, quick to load function.
Where I am stuck is that the standard procedure to make an AJAX call is the browser window event. How do you make the call from within the function? I have tried creating two new variables, "success" and "again" to replace xmlhttp, but still stumble on the event to assign a value. I left the blank password protection (if statement) with that variable to demonstrate what I mean.
I've put in my code below, which is in development and successfully alters the innerHTML text depending on user input but I can't figure out how to insert the relevant php page. I have '// out' the testing bits, but left them for info. (I have tried full 'scripting' as the innerHTML, but it's messy.)
View 4 Replies
View Related
Jun 8, 2011
This is my current script
<script type="text/javascript">
$(document).ready(function(){
$("div.content1").load("content_1.txt");
$("div.content2").load("content_2.txt");
[Code].....
What I'm trying to do is get the script to look for class names div.content"x" and then correctly load content_"x".txt
View 4 Replies
View Related
Aug 2, 2011
I have a table that has parts with multiple characteristics. Part Number, Height, Width, Capacity, Price, Etc. I would like to have a drop downs for all of these values, when a user selects one of these values it will filter the results into a list. Ex. user selects a part that has a Height of 6 and width of 10 it will only list those parts. As I said earlier, I have a script that will give me all the parts, however I am not able to make the onchange list parts with multiple values.
View 9 Replies
View Related
Mar 7, 2011
I have 3 ASP list boxes. I would like to populate the second list box based on the selection in the first list box and based on the selection in the second list box, populate the third. I would like to do this using AJAX. How can I do it? Can someone please give me the code snippet as I am a complete noob when it comes to AJAX and I kinda am running outta time to finish implementing it. Additionally, should I use ASP boxes or HTML <select> tag?
View 4 Replies
View Related
Sep 7, 2010
For Ubuntu 10.04, Apache 2, PHP5 and MySQL 5, Firefox 3.6. (I already had Apache, Mysql and Firefox installed, so only added PHP5 via the synaptic manager a couple of days ago).
I have only just started with Ajax and PHP and obtained some demo files from w3schools.com (by googling on 'Ajax PHP database') that I named w3.html and getuser.php. These show how to find person details in a MySQL data base and send them back to be displayed by a browser. They work when Firefox accesses the demo at w3schools.com.
I put these files into directory /var/www on my PC (the upload file directory) and tried via Firefox, but got this error showing in the Firefox Error console:
I also obtained a similar demo from [url]. It failed in the same way, but worked when accessing www.tizag.com directly.
I googled on permutations of 'Ajax', 'XMLHTTPRequest' and 'no element found' and noticed that many have had this problem. A few said that this problem occurs when the Ajax-side expects XML but gets HTML from the server, but did not give any solutions.
PHP works when I put 'localhost/getuser.php?q=2' into the Firefox addressbar. It generates the result table which looks well-formed to me.
I then modified the eventhandler onreadystatechange to
Code:
And found:
i) The status code returned is always 0 (not 200 or any other 3-digit http return code).
ii) The text returned is the content of the getuser.php file, not the content generated by executing the PHP code.
iii) The 'no element found' error is still shown
My intention was to learn and experiment with Ajax and PHP on my local PC, but it did not work. Can it be done, or do I have to get a website and use FTP to upload?
w3.html
Code:
w3.html:
Code:
Use mysql command source w3demo.sql from the MySQL command line.
View 5 Replies
View Related
Oct 25, 2010
I am implementing Ajax for a new website and I've run into a hurdle.
It seems like Javascript does not 'see' any div elements that are loaded from external file with Ajax.
Is this a common issue, and is there a solution? Or am I overlooking something obvious?
What I'm doing is loading a simple external page via Ajax. The pages loads just fine, and it contains div's with unique id's. If I execute a Javascript function, it seems to not recognize these newly-rendered div's from the Ajax external file. Is this the case? Can Javascript be re-invoked on command, so it can see the new div's?
View 1 Replies
View Related
Mar 12, 2011
I have the following code inside an include file which is included in my index.php page. All of my include files are placed in a folder called includes alongside my index file and the file ajax_getusers.php. When I have tested out this code all in one page it works fine but if I put the first section of code below in an include and include it in my index page it does not work at all. Is therer any reason for this?
Code:
<script type="text/javascript">
function showUser(str)
{
if (str=="")
[Code]....
View 1 Replies
View Related
Mar 16, 2011
I wrote the following code with Dreamweaver:
If I run it in Dreamweaver It works and the alert success is raised, but If I run this code into Safari or Chrome the Error alert is always raised.
View 1 Replies
View Related