Jquery Mobile form action with perl returns blank page, php works fine though -
i have simple jquery mobile html form/action in it, perl returns blank page, suppose print "hello world". if use php, prints fine.
is jquery mobile , perl not compatible each other?
this main html:
<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css"> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"> </script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>welcome homepage</h1> </div> <div data-role="main" class="ui-content"> <!--this works fine<form method="post" action="joo1.php"> --> <form method="post" action="cgi-bin/joo1.pl"><!-- returns blank --> <div> <h3>login information</h3> <label for="usrnm" class="ui-hidden-accessible">username:</label> <input type="text" name="user" id="usrnm" placeholder="username"> <label for="pswd" class="ui-hidden-accessible">password:</label> <input type="password" name="passw" id="pswd" placeholder="password"> <label for="log">keep me logged in</label> <input type="checkbox" name="login" id="log" value="1" data-mini="true"> <input type="submit" data-inline="true" value="log in"> </div> </form> </div> <div data-role="footer"> <h1>footer text</h1> </div> </div> </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ , joo1.pl looks (returns blank page):
#!/usr/bin/perl print "content-type: text/html\n\n"; print "hello, world!"; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ , joo1.php looks (works fine):
<!doctype html> <html> <body> <?php echo "hello, world!"; ?> </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i think see going on here. check text file line ending characters on perl script. if moved code windows box *nix server perl interpreter may seeing code being on 1 line - bang line. when happens no output , no error in apache log files.
Comments
Post a Comment