View Full Version : submit form with data supplied by script

07-10-2006, 11:45 AM
Hi. I have the following problem, I made a complex form that builds a post string in the form field=value&field2=value2..... and issues AJAX POST request to get data and show it inside a table dynamically. The POST string is big and won't fit into query string.

Now, I need to add "results in excel" checkbox to this form. I want to serve the same data I serve in XML to AJAX request, but in HTML form with Excel content type, this way browsers suggest opening it in excel or saving.
Problem is, I need actual post request that reloads the page to do it, and I don't want to realod the page; even if I did, I can't issue a real post request with prebuilt POST string without any form fields.

I figured out I could create an invisible iframe, create a script that will dynamically build the form from the string there and submit it, but that doesn't sound like an awesome solution.
Using clientsie activex to attempt to build Excel table doesn't sound good either.
Are there any better ways to do that?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum