Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Inserting stuff to your web pages?


  • Please log in to reply

#1
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Banned
  • PipPipPip
  • 905 posts
Hi there,

Is this possible...

You make like a html document or something and it just has like a paragraph of text in. Then you name it say 'text' then upload it to the internet. Then if i want to put that text on a main page in my site, could you like include a tag that inserts all the content from the text page into your page?

So like <insert "http://www.allsortsh...com/text.htm">?

So basically i want a tag that inserts all the content from another html page or a .txt file into another html page?

So then, on the main page, if i wanted to update the news story, i could just edit what it says on the text html page and then the page which displayed all the content of the text page on it will automatically change?

Is there a way of doing this?

:tazz:
  • 0

Advertisements


#2
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Hmmm.. I'm not too sure how that works, but I do know it's possible.. atleast with .js files...
Here's the code:

<script type='text/javascript' src='text.js'></script>

Or do you want to basically have a code like the above one that'll insert everything typed in your text.txt file into the page...?

I think the above code might work.. I'd have to test it.. let me try for you.. I'll get back to you in about 15 minutes...
  • 0

#3
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Mm... sorry, but it didn't work for me.. I don't know how to work with that but I tried a few different possibilities... Maybe somone else could give it a shot~!
  • 0

#4
lil_cat_luver

lil_cat_luver

    Member

  • Member
  • PipPipPip
  • 296 posts
With SSI

<!--#include file="page.txt" --> or
<!--#include file="page.shtml" -->


With PHP

<? include('/directory/file.php'); ?>
  • 0

#5
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Ah, see, I'm a HTML and Javascript kindof guy...
I should really take to PHP...
:tazz:
  • 0

#6
lil_cat_luver

lil_cat_luver

    Member

  • Member
  • PipPipPip
  • 296 posts
You can read PHP's manual here http://www.php.net/manual/en/ there's a lot of information there
  • 0

#7
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Thanks a lot!
I'll start reading.
  • 0

#8
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Topic Starter
  • Banned
  • PipPipPip
  • 905 posts
Thanks lil cat luver,

And do i basically just put that tag inside my html document?

And does it go in the <head></head> tags?

And what is SSI?

:tazz:
  • 0

#9
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
That goes in the <body> tag..
I dont know what SSI is but im guessing its a scripting language?
  • 0

#10
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Topic Starter
  • Banned
  • PipPipPip
  • 905 posts
Ahh, and can you insert that tag in php files aswell?
  • 0

Advertisements


#11
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Yes
  • 0

#12
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Topic Starter
  • Banned
  • PipPipPip
  • 905 posts
What pages can you insert the tag into?
  • 0

#13
lil_cat_luver

lil_cat_luver

    Member

  • Member
  • PipPipPip
  • 296 posts
SSI stands for Server Side Includes, and it can only appear in .shtml files. PHP includes can only go in .php files. Oh, and you insert it wherever you want the content to appear

Edited by lil_cat_luver, 20 November 2005 - 09:15 PM.

  • 0

#14
Paradox924X

Paradox924X

    Member

  • Member
  • PipPipPip
  • 208 posts
Oh, ok, that helped me also.. :tazz:
  • 0

#15
Allsortgroup

Allsortgroup

    I SPAMMED Too Much!

  • Topic Starter
  • Banned
  • PipPipPip
  • 905 posts
Ahh,

I see now.

So you insert it in the body tag wherever you want it to be displayed on the page?

Thanks!

:tazz:
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP