meeni said:
Hi,
Trying to find a tool that converts html code to javascript code that I am going to use in an include. There is a lot of tools out there but it seems like they all just work for PC's is there anyone that know one that works on Mac?
Thanks
M
I think what you may be looking for is a PHP solution. I use PHP on a couple of my websites for handling templates. My
Wired by Nature website uses a table-based layout. I created a template based on that table format, then broke it down into sections to wrap around the content. Each section chunk was put into an individual PHP file in a common directory on my server. This way, whenever I want to make a site-wide change, I only have to change my template files. For example, my header consists of a graphical logo and a list of links. I put the code in a file called header.php in a common directory and reference that file in each webpage like this:
<?php include $_SERVER['DOCUMENT_ROOT'] . '/detox/header.php'; ?>
The header.php file consists of this code:
<tr>
<td align="center">
<img src="http://www.wiredbynature.org/detox/header.jpg">
<font size="2" face="Arial">
<a href="http://www.wiredbynature.org/">Home</a> |
<a href="http://www.wiredbynature.org/about.html">About</a> |
<a href="http://www.wiredbynature.org/art/">Art</a> |
<a href="http://www.wiredbynature.org/cars/">Cars</a> |
<a href="http://www.wiredbynature.org/comp/">Computers</a> |
<a href="http://www.wiredbynature.org/food/">Food</a> |
<a href="http://www.wiredbynature.org/ht/">Home Theater</a> |
<a href="http://www.wiredbynature.org/cpanel">Login</a>
</font>
<br />
<br />
</td>
</tr>
Rather than having to deal with all of that code, and the rest of the template code, in every page I make, I have just six lines to code to handle the template. I can easily toss up an article or other webpage using this template. Is this the kind of thing you're looking for?