P is for Practical | |
PerlMonks |
PERL CGI HTML JAVASCRIPT APACHE PROBLEMby MONKTROOPER (Initiate) |
on Apr 22, 2015 at 20:54 UTC ( [id://1124305]=perlquestion: print w/replies, xml ) | Need Help?? |
MONKTROOPER has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks i have a simple implementation using HTML PERL AND JAVASCRIPT , runing with xampp apache web server , the code are the following: HTML PART <!DOCTYPE html><html> <head> <title>Page Title</title> </head> <body> <h1>THIS IS A PERL SCRIPT TEST</h1> <p>WE WILL EXECUTE PERL SCRIPT</p> <br> <a href="http://localhost/cgi-bin/prueba3.cgi"> EXECUTESCRIPT</a> </body> </html> prueba.cgi #!"C:\xampp\perl\bin\perl.exe"use strict; use warnings; use CGI qw{ :standard }; use CGI::Carp qw{ fatalsToBrowser }; print "Content-type: text/html\n\n"; print"<head>"; print "<title>PERL</title>"; print qq{<script src="basico.js">}; print "</script>"; print"</head>"; print "<body>\n"; print "<h1>READY TO TEST A JAVASCRIPT FROM PERL</h1>"; print "<p>THE SCRIPT IS:</p>"; print qq{<input type="button" onclick="popup()" value="EXECUTE SCRIPT!">}; print"</body>\n"; print"</html>"; basico.js function popup() {alert("a javascript is running")} When its runing and click in the EXECUTE SCRIPT! button to call javascript , the browser doesnt respond, using the developer browser tools i can read the message: Failed to load resource: the server responded with a status of 500 (Internal Server Error), could anyone help me? thanks a lot
Back to
Seekers of Perl Wisdom
|
|