![]() |
|
#1
|
|||
|
|||
using a button to change table contents.In brief here is what I have. I use tables for my entire website. I hate frames to please do not reccomend them. my index page has a 3 row 1 column table in it. in the 2 outer cells I have the buttons. The inner cell will contain data. I would like to set it up so when I click on one of the buttons, it takes an include file and places it in the center cell. and removes the include file that is currently there. Basically so I have one HTML page that loads with the logo and all the buttons. and when you click on a button to view the content. it places that content in the center cell. Any help would be appreciated. the site is www.countrysmokehouse.net. so you can see the current layout. I really need to get this done so i hope somebody can help me. Thanks
i can be reached at [removed] |
|||
|
#2
|
||||
|
||||
|
Hi demtro,
I couldn't find the 3 rows / 1 column table on the page. Instead I found a 1 row and 3 column table. Anyway, to do what you want to do, you should use some kind of server-side scripting e.g. ASP, perl or PHP (just to name a few). Perhaps it might be possible to achieve the effect you want just using JavaScript but I don't think that will be very scalable for the long term. Generally, posting your email address on message boards or forum posts is one sure way to get a lot of junk in your mailbox. So I will remove it before the spam bots that 'patrol the area', find it... __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
I am sorry you are correct. I fat fingered the numbers. It is a 3 column 1 row table. I am thinking about using PHP to do it. but i need some guidence. I am just moving into using an actual language other then HTML to design a website, but i am not quite there yet. Any sample code you might offer or a website that might be able to lead me in the right direction would be most appreciative. Also I am willing to link to anybodys website from that site if they help me as a thank you for the help.
|
|
#4
|
||||
|
||||
|
Sure demtro, this is why this board is up - to help anybody.
One question you're going to want to ask yourself: Database or Flatfile? __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
|
For Now Flatfile. I really don't want to go the database route at this time. We are only at the current host for about 1 year and then moving to somebody else. So for the first year the site is up I want to keep it as easy as possible. In fact I have been working on the actual files I want to include in the center cell. So when i get the information I need I can just insert the code and we are close to done. Thanks You are all so kind.
|
|
#6
|
|||
|
|||
|
Also I am using Dreameweaver MX to design the site. I thought this might be important information.
|
|
#7
|
||||
|
||||
|
Okay then, let's say you have 1 file: index.php
PHP Code:
something like that? so links on your website look like: http://www.countrysmokehouse.net/ http://www.countrysmokehouse.net/?f=about http://www.countrysmokehouse.net/?f=privacy or http://www.countrysmokehouse.net/index.php http://www.countrysmokehouse.net/index.php?f=about http://www.countrysmokehouse.net/index.php?f=privacy __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#8
|
|||
|
|||
|
JDS This is great It is what I was looking for. Thank you. There is one other questions I have. What is needed to get the button to execute the code and load the right include? Or am I already missing something? So far we have the code that tells it we are going to include a file and it lists the files to include within the code. I just modify it for all my buttons. But what tells the code wen the button is pressed to load that specific page? Sorry if these are really newbie questions but I really need to get this done. Thanks again. You are being most kind.
|
|
#9
|
||||
|
||||
|
Right now, one of your button is linked like this:
HTML Code:
to have the php+include work, you change that to: HTML Code:
and you have one file in your 'includes' folder named 'beefjerky.inc.php' i.e. Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#10
|
||||
|
||||
Code sample correctionQuote:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Automate a data change php form | mjfmn | MySQL / PHP Forum | 4 | 20-Oct-2003 09:37 |
| radio button problem | zuzupus | MySQL / PHP Forum | 1 | 08-Aug-2003 03:25 |
| Article by the W3C - Cool URI's don't change | jrobbio | Web Design Forum | 4 | 28-Apr-2003 06:40 |
| [Tutorial] MySQL Basics | nniehoff | MySQL / PHP Forum | 15 | 23-Mar-2003 19:42 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The