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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use SRC tag to run .cgi program?? Please help.

Status
Not open for further replies.

perlguy

Programmer
May 17, 2001
26
US
hi there,
I have a very simple question. Is it possible to run ".cgi" or ".pl" program using javascript SRC tag? e.g.
<SCRIPT LANGUAGE=&quot;JavaScript&quot; SRC=&quot;Is there any drawback of doing this ?
Does anyone know what browser supports &quot;SRC&quot; tag??

Appreciated.
 
Of course you can do this, but you need to be careful about what header requirements the CGI script has (Referrer, etc...). I don't know if the browser sends the same request headers for a file requested as a script source, so if your CGI script is looking for certain things, and not finding them, then it might not load correctly. Debugging this is also a pain, because the browser will not show you any error output, unless that error is output in the form of a Javascript document.write() operation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top