ajax

file upload using ajax

I am looking for a ajax method that can be used to file upload. It will be super if I find a funtion that uses Prototype + Script.acul.us ...

Google Elevation API with AJAX?

Hi, I am trying to use the Google Elevation API with the getJSON function of JQuery. I am using this code which is using JSONP : jQuery.getJSON("http://maps.googleapis.com/maps/api/elevation/json?locations=23.444,45.4545&sensor=false&jsoncallback=?", function(json){ alert("a"); }); I can see in Firebug that the GET reque...

Ext JS and PHP File upload and parsing error

Hi, I am trying to upload a text file with more than one record but I keep getting a syntax() error. The implemented logic works fine if there is only one record in the file. Could the problem be that I am echoing multiple records in my foreach loop? Description: Ext JS interface where the user browses for a file. Once file is selecte...

Strange position of the page after loading it

Why is it that every time when I load my site it is not opening as every page, but in the middle, so I have to scroll up to see top of this page. I know it's because Ajax-based chatbox, but I cannot spot where it's wrong. JavaScript is included at the bottom of the page, before </body>. Any ideas? ...

CakePHP: Autocomplete for multiple tags in one textfield

Hi, I want to use the autocomplete component for cakephp but instead of just autocompleting one value in a textfield i want it to work like SOF tags. i.e. one tag, 2nd tag, ... Does anyone know if there is an option for this using this component? thanks, Jonesy ...

JQuery ajax loader and browser caching

I am using JQuery to load some data dynamically via ajax. Whenever the user initiates the ajax request (i.e. clicks a button, or loads a page etc.), I display an ajax loader gif. Once the ajax requests completes (or errors out) I hide the loader image. This works great most of the time. But I noticed (in IE7 for instance) that ajax ca...

Determining creation date of an image in Javascript?

I'm attempting to create a page that displays and refreshes an image from a webcam (camimg.jpg), but displays a static image (notlive.jpg) if the image hasn't been updated recently. I've found the AJAXCam script, which serves the purpose of reloading the "live" image at a set interval (15 secs), yet with no Javascript experience I can't ...

IE javascript problem with break or classname

Hi, i'm not really sure whats the problem here, it works with chrome and ff but not ie. var newdiv = document.createElement("div"); newdiv.innerHTML = xhr.responseText; el = newdiv.firstChild.nextSibling; var next; do{ next = addpoint.nextSibling; if(next.className != "commentstyle golduser") break; }while(addpoint = next); document.get...

How to auto submit using PHP

I have oscommerce based website. The product's attributes are read from text file. All i want is to press the "insert product" button automatically either through AJAX or anything else. So that i can add 100 product daily in automatic way instead of manually uploading them using text file and press "insert product" button 100 times. Ple...

getJSON and invalid label

I am trying to get json data from a url. Url is working ok in FF. I am trying code like this $.getJSON("http://testsite.com/1234/?callback=?", function(data){ //here i am getting invalid label error** } ); When i am trying without callback=? i am getting empty data $.getJSON("http://testsite.com/1234/", function(data){...

jQuery colorbox loading local content in all except Chrome

Hi, I am using Colorbox to load some content from an external (but local) file. The content appears in everything except Google Chrome. The linke with the event handler attached: <div id="content"> <p><a id="modal" href="popup.html" target="_blank">link to popup</a></p> </div> This is the jQuery: $(document).ready...

Response Object not returning Excel stream in update Panel?

I am generating an Excel file upon a click of a button in an update panel. It is throwing a parsing error. Please see below code. If I keep the button outside the update panel it is working fine. Why isn't it working in the update Panel? Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", ...

How to import CKEditor trhrough jQuery Ajax?

Hello, I'm making a simple data grid aplication and when I click a row in a table, I want to be able to import a textarea box with CKEditor on it. Now when I import the .php page, nothing shows up. As for every other html part, that was imported, the already running JS on the page isn't refering to the imported html. For the other cod...

Know If a user has visited your site from a Blackberry

I found this piece of code that can detect if a user has already visited your web page by injecting a hidden link into the DOM and checking if the color of it is the same as the one for visited links. function hasLinkBeenVisited(url) { var link = document.createElement('a'); link.href = url; document....

How can I make a random quote generator with ajax?

Basically I have a page with a quote in it. Underneath the quote, I will have a link that will be clicked and the quote will be updated with an ajax call from the database to display the new content. I can do it with a regular php file, but I wanted to add some ajax into the mix so that the entire page isn't refreshed each time. Can som...

How to pass an onclick link value to javascript and cfc though cfajaxproxy?

How do I pass an onclick value <CFOUTPUT QUERY="questions"><A HREF="javascript;()" onClick="VoteNo('#ID#');" ID="VotedNo">I Vote No</A></CFOUTPUT> in to javascript so that the script can be used multiple times for different questions? I am also using cfajaxproxy with the javascript so that ID value also needs to be passed on to the CFC s...

new value overwriting the previous values

Ok so i have this javascript function getpreconfigproducts(str1,str2) { var url="ajax_preconfig_products.php?"; url=url+"id="+str1+"&cid="+str2; xmlHttp = GetXmlHttpObject(stateChangeHandler); xmlHttp_Get(xmlHttp, url); return false; } and it calls this php <?php if($_GET['id']!='') { $sql="SELECT * FROM productinfo WHERE Product...

Show clickable thumbnails that load in same page

The task: present a series of images on a corporate intranet web site to users for viewing. I hacked together some javascript to show the list of images with thumbnails, and each image is clickable and takes you to the large image, but then you have to hit back to go to the next image, and I'm being asked to provide some next/previous f...

facing problem with triple drop down menu

I am trying triple drop down menu first and second menus are working but third one is not working and also the data is not being displayed on the web-page even though I have used "echo" command. I am unsure what is the problem and how to correct it. So I am attaching my code in this email, could you please look into it and help me with i...

Load .NET Resources Client-Side on each request

I have the following JavaScript snippet: <script type="text/javascript"> var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_beginRequest(ajaxBeginRequest); prm.add_endRequest(ajaxEndRequest); function ajaxBeginRequest(sender, args) { $.blockUI({ message: '<h1><img src="/images/ajax_loading.gif" /> ...