Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page manipulation? I think. 4

Status
Not open for further replies.

kalachylde

IS-IT--Management
Dec 21, 2004
21
US
Hi,

I'm trying to start a website but am not sure I made a smart purchase. I bought 10 pages from a hosting site and I think I may need more. I was wondering if I could use frames and menu options to manipulate one page to make it look like a few more. *When a visitor selects on of the menu items the main frame within that page chages, but all of the bordering frames stay the same. It's a bit hard to explain and I'm a beginner in the HTML world. There's a site that has menu tabs and maneuvering almost exactly the way I want mine. Can you guys take a glance tell me if it's possible to do this without purchasing more pages. Or maybe recommend a new web host.



Thanks
 
what you can do (not a good solution) is keep content of, for example, three pages each in separate divs. Then, you can create navigation that will hide two pages and show one page.

For example: you could have code like this:

Code:
<div id="about_div" style="display: none;">
  Text about my site.  Text about my site.
</div>
<div id="contact_div" style="display: none;">
  Ways to contact me.  Ways to contact me.
</div>
<div id="third_div" style="display: none;">
  Here is a third div.  Here is a third div.
</div>

And you could have javascript functionality to show/hide these divs:
Code:
<script language="javascript"><!--
var divs = new Array('about_div','contact_div','third_div');

function hideThenShow(theDiv) {
    for (var i = 0; i < divs.length; i++) {
        var e = document.getElementById(divs[i]);
        e.style.display = (theDiv == e.id) ? 'block' : 'none';
    }

}
--></script>
And call it like this:
Code:
<a href="#" onclick="hideThenShow('contact_div'); return false;">Contact Me</a>

I didn't test this. Notice it will be a longer load time if you have three very large divs.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
I think I get what you're saying. Using your 3 page example (page 1:rocks, page 2:paper, page 3:scissors) Page 1 has divisions of rock types (crumbly, smooth, and rough). Page 2 divides paper type and so on. When the visitor selects crumbly, the main frame brings up the crumbly section (only)? Am I close?
 
yeah, close, but my example did not use frames - it used css to make divs appear and disappear.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Okay, CSS is a new term to me. Is it HTML? It sounds a lot better to use than frames and I've seen a few postings that mention it.
 
CSS = Cascading Style Sheets.

It was once the new up-and-coming concept to hit the web. Now it's becoming pretty standard. The main concept behind CSS is "separating content from design". Basically, it allows you to use HTML for its natural intention: to display content in a browser. When you integrate C[blue]S[/blue]S with the HTML, you can make your content have different appearances.

In the example I provided above, you can see instances of "inline" css - css that is integrated directly into an HTML tag. You can do this, or you can create a separate "sheet" to hold all of your style definitions.

Once you learn CSS, you will quickly fall in love with it and never want it any other way.

See here for more. And by any means necessary, avoid frames!

p.s. - why did you go with a host that only allows 10 pages? I've never heard of that.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
You didn't get caught by storesonline.com, did you? Check out the complaints and problems that company has had. I've had personal experience with them, all bad.

Lee
 
(I) am not sure I made a smart purchase. I bought 10 pages from a hosting site ...
I'm afraid you've made a lousy purchase. Some design firms might charge you by the page, but no reputable hosting company should. Disk space is so cheap these days that even free hosts like Geocities will give you 15MB to store your pages - that's enough for hundreds of them.

Get out and find a more sensible deal elsewhere.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thanks Chris. I was so caught up in buying to domain and next thing I know... I was sold :-( I feel like a navy kid out of boot camp in a used car lot. Thanks though, I'll continue to shop around.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top