MetaChat REGISTER   ||   LOGIN   ||   IMAGES ARE OFF   ||   RECENT COMMENTS




artphoto by splunge
artphoto by TheophileEscargot
artphoto by Kronos_to_Earth
artphoto by ethylene

Home

About

Search

Archives

Mecha Wiki

Metachat Eye

Emcee

IRC Channels

IRC FAQ


 RSS


Comment Feed:

RSS

20 April 2006

Askmecha: HTML help I heard about a tag that can update globally. Suppose I have a footer with a phone number that appears on all the pages of a site. How can I update that number once with a tag? Thanks!
I've been trying to find it all morning. I think the tag begins with an "i" though I could be wrong.

It's really kind of sad that I was too scared of being called a retard to post this kind of thing to askmefi.
posted by frecklefaerie 20 April | 12:06
iframe?
posted by sciurus 20 April | 12:10
You could use SHTML markup (tutorial) to call a file that contains the footer HTML. Since the footer is in a separate file, you just edit this file when you need to, and if all your pages use SHTML, they'll render with the updated footer.

Another option if you have PHP available to you is store your values in an key-value array (e.g. $phone_numbers[]) in an include file, e.g. phone_numbers.inc.

Then use require_once() to add the phone_numbers.inc file in the header of all of your pages.

In your footer, you'd call something like <?php echo $phone_number['tech_support']; ?> to add the technical support phone number to your footer.
posted by AlexReynolds 20 April | 12:13
Well if you saved the phone number as an gif, you could use the IMG tag globally. ;)
posted by danostuporstar 20 April | 12:31
Well, it's actually a calendar that has hyperlinked days that link to correspondence that have gone out that day. I would rather not be updating the calendar on every page. I'll look into the frames and the shtml options. Thanks, guys!
posted by frecklefaerie 20 April | 12:39
If you have SSI (server-side includes) available then you can do something like this:

<!--#include file="phonenumber.txt" -->
posted by Wolfdog 20 April | 12:52
If your server has php (which it almost certainly does), you can use an include - this is a really easy way for dummies like me to do this, so it should be a piece of cake for you. See here.
posted by dg 20 April | 17:31
Foxworth or Smoove B? || This is a HAHAHAHA SUCK IT Thread

HOME  ||   REGISTER  ||   LOGIN