New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

Converting html to javascript


Post Reply New Thread Subscribe

 
Thread Tools
meeni
Guest
 
Posts: n/a

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
QUOTE Thanks
Jonathan
Guest
 
Posts: n/a

why are you converting, what are you trying to do?
QUOTE Thanks
gh11

 
Member Since: Apr 02, 2006
Posts: 51
gh11 is on a distinguished road

gh11 is offline
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.
QUOTE Thanks
kaidomac

 
Member Since: Jan 18, 2006
Posts: 1,868
kaidomac is just really nicekaidomac is just really nicekaidomac is just really nicekaidomac is just really nice
Mac Specs: G4 Cube

kaidomac is offline
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
QUOTE Thanks
Jonathan
Guest
 
Posts: n/a

why not use a list?
QUOTE Thanks

Post Reply New Thread Subscribe


« Mac os x search box! | looking 4 best photo proggy 2 use with DW8 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
trouble converting and storing html page to pdf file Water OS X - Apps and Games 1 02-08-2006 03:13 AM
website html appleworks problems please help! MrPencil Web Design and Hosting 6 10-07-2005 03:57 PM
Javascript and Frames problem in Safari HarrySpier Web Design and Hosting 3 11-09-2004 04:47 PM
Can't read HTML emails on OE 5.0.6 krs Running Windows (or anything else) on your Mac 0 10-17-2004 11:47 AM

All times are GMT -4. The time now is 04:29 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?