Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Use of text on more than one page
Old 08-03-2006, 11:56 PM Use of text on more than one page
Novice Talker

Posts: 12
Name: Harley R. Lee
Trades: 0
Hi all.
In my pages I have made for the non-profit organization "parentsuUnited.info" I have pages for many different chapters of that organization around the country in the same directory as the home page. To reach these pages you use the address of the home page plus a "/name" for the other chapter's pages.

I need to use the same text now and then in more than one of these pages. I need to know how to use such text in these different pages without having a copy of it in the directory of each page, which would be wasting space. (by the way, I don't use a code writing program, I just use a text editor.)
Thanks
HarleyR
HarleyR is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-04-2006, 02:16 AM Re: Use of text on more than one page
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
It's not something you can do in html alone. You generally use a server side scripting language to accomplish what you want. I use php, but you could also use a language like asp or asp.net.

basically the text that you'll want to repeat sits in its own file somewhere and when you want that code to appear you add a line of code to include that file.

You don't need any special code writing program, but you obviously need a little understanding of the server side scripting language, but it's not so deep into the language that it would take long to be comfortable with it.

Ok I kind of lied in my first statement. There is a way you can do this with html alone, but the scripting way really is better. With html alone you could use frames. In this case an iframe is probably easiest. You would put the text you want to repeat in it's own html file and then use code like:

<iframe src="path-to-your-file" width="100%"></iframe>

The width is up to you and your particlular layout, but you'll probably want to use one. Thought I'd see if I could get you to learn a little scripting and there really are issues with using frames so it's generally best to stay away from them.

By the way instead of using just a text editor (which is perfectly fine by the way) might I suggest a code editor. There are many free ones, but they will usually have a few features that make coding easier.

I use HTML Kit and here's a list of free html editors you can try. I've found PSPad to be an easy one to migrate to from a text editor like notepad
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 08-04-2006, 08:46 AM Re: Use of text on more than one page
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
IF your server is IIS you can use include files.

<!--#INCLUDE <FILE/VIRTUAL> = "filename.ext"-->

your html files will need to use the extension of shtml (file.shtml)
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 08-04-2006, 12:10 PM Re: Use of text on more than one page
Novice Talker

Posts: 12
Name: Harley R. Lee
Trades: 0
To Vangogh and Chip Johns, thanks to you both. I am somewhat familiar with frames because I use them in my page "asl1.org" that teaches American Sign Language.

I am not sure what an "iframe" is, but I will search it out. I will also learn about the scripting languages. I am 78 years old, but I can still learn.
HarleyR
HarleyR is offline
Reply With Quote
View Public Profile
 
Old 08-04-2006, 02:40 PM Re: Use of text on more than one page
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
An iframe is short for inline frame. So it adds a window to another page wherever you put it. If you just use the code above I think you'll see what it does right away.

Chip reminded me of another option. If your server is Apache you can use server side includes (SSI) to do the same things as the scripting language.

I think everyone can learn at any age. You'll be the one the inspires the rest of us.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 08-05-2006, 03:20 PM Re: Use of text on more than one page
Novice Talker

Posts: 12
Name: Harley R. Lee
Trades: 0
Thanks Vangogh, I tried the frames idea and it works great!! I have a book on PHP and am learning.
Thanks so much for your help.
HarleyR
HarleyR is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Use of text on more than one page
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33837 seconds with 12 queries