Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing variables from CGI

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

Does anyone know if Javascript can be used to query a CGI script and then display the value returned by the CGI?

Neil
nc@cyberdude.com
 
The easiest way is to use your CGI to render your HTML page including the necessary JavaScript variables.

If you absolutely have to do it dynamically without refreshing, you can use the trick of creating a zero-width frame, run the CGI in that frame (which returns a page with JavaScript variables defined), and use JavaScript to get parent.invisible_frame.document.variable.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top