i'm not talking about linking to an iframe on the same page, that's no problem. i'm talking about linking from another page...loading my index page, and pulling up a page other than my default into my "main" iframe.
i'm not sure if this can be done without php.
in this case the link will be in a news letter. here's what i'm working with...
I'm sorry i can't answer your question because i can't quite figure out exactly how and where you want your links to load.
Now, i know you didn't ask for a site review or anything, but...
The page takes FOREVER to load. I click on a link and I have to wait approximately 20 seconds, and I'm that's on a cable connection.
I think the main reason for this is an overly complex layout. (Tables nested 4 deep, iframes within iframes, etc)
The problems you're having with links targeting frames could very well be due to the fact that you're making the page more complex than it needs to be. It's always a good idea to look at the big picture first.
Ask yourself why you need all the frames. I noticed that a lot of iframes contained no links or only contained links targeting the "main" iframe. If it's just the scrolling you want, you can easily achieve this effect with a scrolling div. Never mind how many points you gain from an accessibilty standpoint.
Site maintenance might not be an issue for you, seeing that the whole thing is served off with PHP, but at least think of it from a user's perspective. Right now, the site is practically unnavigable because of it's just so SLOW.
Sorry, if that was off-topic.
Do you think you could more clearly explain to me what you're trying to achieve?
well, no i wasn't wanting a site review...lol but hey, thanks anyway "Never mind how many points you gain from an accessibilty standpoint." <-- what's that mean??
anyway...i don't find this site too complex, everything is actually running sound. if you'll notice, the only pages that take forever to load are the pages from the "shop.vadj.com" server. although, this tends to be the important part of the site, it's not in my powers to make my clients shop server run faster. however, i have emailed them to discuss the situation. even if you visit http://shop.vadj.com where no iframes exist, it still runs slow as peepee. i believe they have transfered to a backup serevr to do maintenace to the main server. everything on the vadj.com side of things, loads rather nicely.
my reason for the iframes, other than the "main," is so my client can easily edit his files, such as, his daily news, charts, hot picks, and featured sections. it would be rather difficult and confusing for my client to edit all of these if they were in scrolling divs. this way, all he has to edit is plain text on a plain html document.
as for tables four deep, almost any site you see, especially, forums are four or more tables deep. in my experience, i haven't noticed it to hinder any loading time, though i could be wrong. http://www.panamacityunderground.com (a forum i did)
now back to my problem that's driving me up the wall!!
ok... say "HERE" is a link ("HERE" is a link that would be in an email news letter). i want that link to load my index page in a new window, but instead of loading my default iframe page ("home.html"). i want it to load a product page, such as, " http://shop.vadj.com/merchant.ihtml?step=4&pid=16116&id=432 ".
get what i'm saying?
say you're in your email, and i sent you a link. you click on, http://www.vadj.com ... my index page loads, and my default iframe page (home.html) loads in the "main" iframe.
what i want to happen when clicking on that link, http://www.vadj.com ...is for my index page to load, but instead of my default iframe page (home.html) to load, i awnt a product page to load in my iframe.
now, i'm not sure how to link it... i was thinking it'd be something like this:
I think you would gain a significant benefit from dropping the iframes and using a server side language to include the text files that the client will update.
This would simplify everything all around, and add some flexibility as well.
I would strongly recommend using PHP, and calling the text files into a template page.
Quick, easy, no worries about loading different pages into different places and all.....
Getting a link to load into your iframe without a server side solution requires adding a "target" to <a> tag. The iframe needs a name, and you add target="iframename" to the link.
As far as I know, you can't get an external link to load anything into that iframe.
Edit - and yes, nested tables are bad, especially when there is absolutely no need for them. You can save load (rendering) time as well as bandwidth by converting to a simplified CSS controlled layout. This and many other forums do yo use nested tables, because that was once the only way to acomplish this. It no longer is. More iimportantly though, Forums are a far different issue then general page layout, requring more specialized attention in most cases.
[This message has been edited by DL-44 (edited 07-15-2003).]
hey, nice reply, i've been looking for a good tutoial about SSi and PHP.
about the php...you're talking about replacing the just the iframes that i added to allow my client to edit plain html documents, not the iframes all together, right? php would allow me to have a form and input box where he could just pull up a page, type into a box, and submit it, right?
now, i know about the naming of the iframe and targeting.. "<a href="http://vadj.com.com" target="main">"
and, i'm pretty sure what i'm looking for can be done...i'm also sure, i'm probably going about the wrong way.
also, the site isn't done, i plan on using a simplified CSS. my CSS is currently at the top of each page in the <style> tag. this will soon be moved and targeted in a .css file.
and, about tables...how deep is too deep? sometimes i just can't make things work out right, unless i put a table inside a table.
thanks again for the replies, and thanks for the tutorials. just so you know, i don't have a problem reading and learning, which i'd rather do. i'm not looking for someone to just post the code for me, although it'd be nice...lol
i don't have time at the moment to read your tutorials, so the answer may lie in there. however, if there is anymore input to be given, please share.
I would drop iframes altogether - they tend to complicate things without much (if any) real benefit.
The PHP or SSI would allow you to to include the external information in the middle of the page (in whichever manner you would like) and would exclude the need for the iframes.
PHP would also allow for a variety of methods for updating the html document that is to be included, making it nice and easy for the client. Of course, some methods can obviously get increasingly complex to code initially, depending on what you want.
In the link you posted, they are basically saying to add a stipulation to the PHP code that sets the source of the iframe to the default page if no page is declared in the url to the page. With the code she was using, nothing would load in the iframe if the source wasn't wasn't sent as a variable through the url.
Well, from a purist's point of view, just the fact that you're using a table for layout (and therefore, using it for something it was never intended to do) is "too deep."
However, from a practical point of view, I think a table nested within a table should be enough. I've never had to nest a table within a table WITHIN a table, before, although that's just me. Actually, I don't use tables at all anymore, but that's just some advice from my former self. I find CSS much more flexible nowadays.
The reason you don't want to nest tables is that most browsers don't show any part of a table until it is completely rendered. Therefore with tables 4 levels deep, browsers will read the outermost one first, then realize that there's another within it, and another, and another... and work from the inside out. The outermost table won't display until all the inner tables are rendered, causing the delay.
As for my comment about accessibility, realize that the use of any frames is sure to harm at least one person in the world. Whether they use a screenreader or a text-only browser, frames wreak havoc with navigation. Having NESTED frames only compounds the situation.
EDIT: Yes, I know now that the server was largely responsible for the delay. Even so, it never hurts to clean up the code a bit also. Sorry if I implied that the "slowness" of the page was all your fault.
[This message has been edited by ozphactor (edited 07-15-2003).]
no tables at all???? how's that? i guess i'm behind the times. i only do this on the side...so i learn in spurts...hard for me to stay up on the new stuff. what do you use? divs?
and, i don't think i'm going take out the iframes completely, i'll just clean it up a little bit. it's already done, i'd have to redo it, and my client is happy anyway. but, i'm still wanting to learn it, so i can use php next time.
so, let me ask you this...the cart program on that site is ihtml. would i run into any problems using php or ssi to pull up ihtml?
anyway, i think this topic is done, i'm going to start on those tutorials, so...i'm sure i'll be posting about it somemore.