Skip to content
Advertisement

Tag: ajax

Download a file with an ajax call

I am using PHPExcel to read an excel template, populate the data, and ask the user to download the file. generate_excel.php When I open generate_excel.php directly from the browser, the result file is downloaded. But if I make an ajax call to the generate_excel.php, I don’t get the download prompt. Using chrome developer tools, I can see from the Network

Add radio button selection to database via ajax?

When I test my form it adds data successfully to my database table but the radio button selection is always “Ungrouped” which is the first radio button in the group. I tried giving them separate id’s, but in my ajax.js file my function uses this: Which means that now I am calling an id that doesnt exist (I think thats

loading a view after an ajax call, CodeIgniter

I have an ajax call from javascript to a method in a controller, the method in the controller should be loading a view(like, show a new page on the screen), Although everything seems ok, the new view doesn’t seem to load on the screen. I cannot use header or windows.location because, i am passing an array variable, containing data to

Creating a table with mysql, php and ajax (with jquery)

For my new project i want the so modern approach of not needing to reload a page on every database request. 🙂 I want the script to query the database and create a table with the query information. I have tried different scripts i have found on the internet. The one below was closest to my needs. index.php getdata.php But

Simulating a command shell output in a web browser

BACKGROUND: Right now, in our company we have a PHP based app to automate our report building. It works like this: A webpage with a form generates a ini file with some configurations that is saved localy a PHP CLI script accepts the ini file generated on step 1 and based on it, creates a directory with documents whose data

Symfony 2 dynamically change form based on a selected value

I have the following table: EventType can have a few values i.e check-in, checkout, room rent, misc, etc. I want to make a form that will change the field type of “Value” to text, date, or entity based on the selected type in “EventType”. I tried to find some solutions but didn’t succeed. The only thing I found is that

Jquery ajax get request

I am new to jquery and php, I have two input fields, zip and city, the city shall output a value based from the zip that the user input. The jquery script shall call a URL: http://domain.com/city?zip.php=”zip; so that zip.php will return an echo value that will output to the city input field. I tried using ajax getXMLHTTP. some times

Advertisement