Reply
html and frames?
Old 05-19-2006, 09:14 PM html and frames?
Average Talker

Posts: 17
Ok, This question is a little different than my last....

I have a psd that I exported into html format so I could edit in dreamweaver, see here:



The right area will contain links to different areas of the site. The green/yellow area is the logo. Here is what I want; I want to click on any of the Five links on the right and have the content in the white area (text/pics) change in relation to the clicked hyperlink. Is it possible to do this without the end user re-downloading the surrounding images?

Some users are on dial up, so if they can download the 'template' of the website just once and click the links to change the text/pics in the white area I think that would save some loading time. Do I need to employ some form of frames? Thanks!
nfl2k22 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 05-19-2006, 11:10 PM Re: html and frames?
xplicit's Avatar
Average Talker

Posts: 23
Location: http://xplicit.godzsite.com
this isnt a very detailed answer but have u thought about using an iframe instead of frames?

frames are basically loading 3 or 4 different pages at once and showing them on 1 page.

iframe is where u have page and then u display another page inside a window.

google it and see if that solves your problem.
__________________
XpLiCiT Hosting!
The Future Is Bright, The Future is 0penSource.
Free cPanel Php And mySql - No ADS!
xplicit is offline
Reply With Quote
View Public Profile Visit xplicit's homepage!
 
Old 05-20-2006, 06:58 PM Re: html and frames?
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Beginning Ajax with PHP
Posts: 161
Location: MS
A suggestion, use DHTML(javascript + HTML + CSS) so that when you click a link it automatically shows up there. You will have to make special consideration tho for those ppl who don't enable javascript.

But the best course of action in my opinion is to use a server side programming language to do the switching and use CSS for your images (as backgrounds)
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 05-20-2006, 08:08 PM Re: html and frames?
Average Talker

Posts: 17
I will look into using iframes.

Quote:
A suggestion, use DHTML(javascript + HTML + CSS) so that when you click a link it automatically shows up there. You will have to make special consideration tho for those ppl who don't enable javascript.

But the best course of action in my opinion is to use a server side programming language to do the switching and use CSS for your images (as backgrounds)
Could you give me an example of DHTML in this situation?

As far as server side scripting, I'm not that advanced, and I hear that it entails quite a high learning curve as opposed to learning html/js. Unfortunetly I don't have time to learn another language.
nfl2k22 is offline
Reply With Quote
View Public Profile
 
Old 05-21-2006, 07:46 AM Re: html and frames?
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Beginning Ajax with PHP
Posts: 161
Location: MS
If you know javascript then you don't need to learn anything new. DHTML is Javascript, HTML and CSS combined. It basically stands for Dynamic HTML.

But as for an example for DHTML.

For each "menu" section you want to change on a link click you need to create a div for it. Example:

HTML Code:
<a href="">Menu Link 1</a>
the resulting link change would be connected with:

HTML Code:
<div id="link1" class="link_info">
  Link 1 Information
</div>
For each link you would have the similar information.

The style sheet information you need for the information would be similar to:

HTML Code:
.link_info {
 width: 200px;
 display: none;
 background-color: #FFFFFF;
}
The display part is the important part.

For any area you want open before any clicks you need to add in:

HTML Code:
<div id="link1" class="link_info" style="display: block;">
  Link 1 Information
</div>
The inline style will override the class and it needs to be specified otherwise you will run into problems with the javascript.

The javascript you need to add to your link would look like something like this.

HTML Code:
<a href="someplace for ppl with out JS" onclick="javascript: toggle('link1'); return false;">Menu Link 1</a>
Here is the javascript you need:
HTML Code:
<script type="text/javascript">
 var current = "link1";

function toggle(item)
{
 if(item != current)
 {
   obj = document.getElementById(item);
   old = document.getElementById(current);
   current = item;
   obj.style.display = "block";
   old.style.display = "none";
 }
 else return;
}
</script>
This should be on each page, I've not been able to make it work correctly in an external js file.

You can seen an example like this at:

http://www.gaidin.org - The above code is used there.

As a side note, there is a completely CSS way to do the same thing with hovers. But I myself don't have the reference material handy to show you any examples.

Last edited by AliKat : 05-21-2006 at 07:47 AM.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Reply     « Reply to html and frames?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB 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.20806 seconds with 12 queries