Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2004, 04:18 PM
Authorized User
 
Join Date: Aug 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML with UNIX Commands

Is it possible to use HTML code to run UNIX scripts?

 
Old October 26th, 2004, 09:25 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  HTML is not a programming language.



----------
Rajani

 
Old October 26th, 2004, 09:42 PM
Authorized User
 
Join Date: Aug 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok,
I kind of knew that, but my question still remains. Can I embed UNIX commands in HTML statements, code, whatever. Excuse me for not having the syntax correct.

 
Old October 27th, 2004, 07:05 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Sure, if you mean execute a shell command and take the results of that command and format it in an HTML document. This can be done using a server-side language like PHP.

<html>
    <head>
         <title></title>
    </head>
    <body>
    <?php
         echo 'Hello, world!';
    ?>
    </body>
</html>

PHP is a programming language capable of running on any platform, Windows, Mac and *nix. Shell commands can be executed from PHP by enclosing the statements in backticks. The results from those commands can then be stored in variables or output directly to browsers. PHP can be emedded in HTML documents, or output HTML documents itself.

http://www.php.net

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
[http://pear.php.net/Mail_IMAP] A PHP/C-Client/PEAR solution for webmail
 
Old October 27th, 2004, 09:54 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Why don't you explain what you are trying to achieve? Are you attempting to run a shell script on a server when a page is requested or run commands on a Unix client when they view an HTML page?

--

Joe
 
Old October 27th, 2004, 05:20 PM
Authorized User
 
Join Date: Aug 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I will. My system administrator is going to give me the code he is working with tomorrow. He is trying to run commands on a UNIX client.

 
Old October 28th, 2004, 02:39 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Okay, let us know what browser the client will be using and an example of the commands.

--

Joe
 
Old October 29th, 2004, 02:04 PM
Authorized User
 
Join Date: Aug 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The browser that will be used is Internet Explorer. Below is a copy of the commands:

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Export Label Printing</title>
<meta name="Microsoft Theme" content="leaves 011">
</head>

</form>

<form method="POST" action="--WEBBOT-SELF--">
  <p><input border="0"><img src=/icons/apache_pb.gif><name="I1" width="259" heig
ht="32" type="image"></p>
</form>
<p align="center">PADC EXPORT LABEL
PRINTING&nbsp;&nbsp;&nbsp; </p>
<p align="left"><input type="button" value="PRINT
" name="/opt/hpws/apache/cgi-bin/unitrade.sh"><run unitrade.sh>
Unitrade
Forwarding Solectron, Mx Bldg 1 (100 ea)</p>
<p align="left">&nbsp;</p>


</html>



The commands in bold is what he is trying to run. When he clicks the PRINT command button on his web page he wants the command button to run unitrade.sh which is on his unix server. But here's the thing. unitrade.sh is a label written in Zebra Programming language which is simply language that prints to a Zebra printer. Is he on the right track. This is a start for now. He needs help with this and I want to do the best I can to give him some assistance. Thanks for the help.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Python's commands: Help Static Python 3 March 26th, 2015 12:34 AM
ABOUT AT COMMANDS bobwith5 Visual Basic 2005 Basics 1 October 31st, 2007 02:25 PM
Help-Implementing a unix shell to run commands ssimkhan Java Basics 1 June 15th, 2007 06:43 AM
Help-Implementing a unix shell to run commands ssimkhan Pro Java 0 June 7th, 2007 04:58 AM
sql commands dr BOOK: Beginning Ruby on Rails 1 April 27th, 2007 12:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.