Results 1 to 5 of 5
  1. #1
    meeni
    Guest
    Converting html to javascript
    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

  2. #2
    Jonathan
    Guest
    why are you converting, what are you trying to do?

  3. #3
    Converting html to javascript

    Member Since
    Apr 02, 2006
    Posts
    51
    HTML and javascript are completely different types of languages, and cant be converted. What do you mean included? You just put the javascript you want to use in the html document with a script tag.

  4. #4
    Converting html to javascript

    Member Since
    Jan 18, 2006
    Posts
    1,868
    Specs:
    G4 Cube
    Quote Originally Posted by meeni
    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> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/about.html">About</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/art/">Art</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/cars/">Cars</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/comp/">Computers</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/food/">Food</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/ht/">Home Theater</a> &nbsp;|&nbsp;
    <a href="http://www.wiredbynature.org/cpanel">Login</a> &nbsp;
    </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?
    Mac Sites - down for reconstruction

  5. #5
    Jonathan
    Guest
    why not use a list?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Javascript/HTML issue
    By Mbengi Bongi in forum Web Design and Hosting
    Replies: 22
    Last Post: 12-21-2011, 03:23 PM
  2. Opening Local HTML files - render HTML (not display as text)
    By Gator626 in forum OS X - Operating System
    Replies: 6
    Last Post: 11-01-2009, 08:00 PM
  3. Converting Safari Web Pages to HTML? Please help!
    By tears2040 in forum Switcher Hangout
    Replies: 3
    Last Post: 04-19-2008, 08:43 AM
  4. Converting Mp3's Into HTML codes?
    By timboyx in forum OS X - Apps and Games
    Replies: 4
    Last Post: 05-17-2007, 06:27 AM
  5. trouble converting and storing html page to pdf file
    By Water in forum OS X - Apps and Games
    Replies: 1
    Last Post: 02-08-2006, 03:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •