Faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

Can I submit a form and capture the output of the submission in a javascript variable?

Apr 9th, 2008 20:29
ha mo, Dave Clark, fab gab,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fab,
     It depends upon what you mean.  If you change the FORM METHOD 
to "GET" and the FORM ACTION to "" then the content of the form will 
be returned to you as name/value pairs in the following property:
self.location.search
     If you want the *results* of the submission -- i.e., what is 
*returned* from teh server as a response to the submission -- then you 
have to use AJAX for that:
http://jibbering.com/2002/4/httprequest.html
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.healthinhealth.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com