Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 26th, 2004, 04:18 PM
Authorized User
 
Join Date: Aug 2004
Location: Harrisburg, PA, USA.
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?

Reply With Quote
  #2 (permalink)  
Old October 26th, 2004, 09:25 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,

  HTML is not a programming language.



----------
Rajani

Reply With Quote
  #3 (permalink)  
Old October 26th, 2004, 09:42 PM
Authorized User
 
Join Date: Aug 2004
Location: Harrisburg, PA, USA.
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.

Reply With Quote
  #4 (permalink)  
Old October 27th, 2004, 07:05 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
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
Reply With Quote
  #5 (permalink)  
Old October 27th, 2004, 09:54 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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
Reply With Quote
  #6 (permalink)  
Old October 27th, 2004, 05:20 PM
Authorized User
 
Join Date: Aug 2004
Location: Harrisburg, PA, USA.
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.

Reply With Quote
  #7 (permalink)  
Old October 28th, 2004, 02:39 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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
Reply With Quote
  #8 (permalink)  
Old October 29th, 2004, 02:04 PM
Authorized User
 
Join Date: Aug 2004
Location: Harrisburg, PA, USA.
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.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:55 AM.


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